Loading
Salesforce Help 사이트 “Help Agent powered by Fin” 도입 안내더 많이 읽기
Tableau 고객 대상: Tableau를 이용하는 고객이 Help 사이트에서 사례(케이스)를 등록할 수 없는 경우의 대체 수단더 많이 읽기
Slack 관련 문의처가 Salesforce Help로 통합 및 변경됩니다.더 많이 읽기

Missing Records in Report Exports Above 2,000 Records When Using CASESAFEID (18-Digit ID) in Reports API

게시 일자: Sep 23, 2026
상세 설명

When the report sorting and pagination in the Analytics/Reports API are based on a formula field using `CASESAFEID(Id)` (18-Digit ID), pagination may not work as expected for report exports containing more than 2,000 records. As a result, some records may be skipped or missing across paginated API responses.

Why This Happens

This behavior occurs because `CASESAFEID(Id)` is a Formula field with a Text data type. When the field is used as the sorting column and pagination cursor in the Reports API, the `lessThan` filter performs a case-sensitive string comparison instead of a numeric or deterministic ID comparison.

The 18-character Salesforce ID generated by `CASESAFEID()` contains mixed-case characters. Due to the case-sensitive lexical comparison performed during pagination, the sorting order can become inconsistent between API calls. This can lead to:

  • Missing records during pagination
  • Duplicate or skipped result sets
  • Inconsistent export results for large reports
  • Pagination offsets not aligning correctly after the 2,000-record limit

When This Occurs

This behavior is specifically observed when:

  • The report contains more than 2,000 records
  • Pagination is implemented using `lessThan` filters
  • Sorting is based on a Text formula field using `CASESAFEID(Id)`
솔루션

To avoid this issue, it is recommended not to use `CASESAFEID(Id)` formula fields as the sorting or pagination cursor field in Reports API integrations. Instead, use stable and deterministic fields such as:

  • Native Record ID (`Id`)
  • CreatedDate
  • LastModifiedDate
  • Numeric or non-formula indexed fields

This ensures consistent pagination behavior and prevents missing records during large report exports.

추가 자원

CASESAFEID

Knowledge 기사 번호

005321970

 
로드 중
Salesforce Help | Article