CASESAFEID(Id) (18 桁の ID) を使用する数式項目に基づいて、Analytics/Reports API のレポートの並べ替えとページ分割が行われる場合、2,000 件を超えるレコードを含むレポートエクスポートでは、ページ分割が期待どおりに動作しない可能性があります。その結果、ページ分割された API 応答で一部のレコードがスキップされたり欠落したりする可能性があります。
この動作は、CASESAFEID(Id) が Text データ型の数式項目であるために発生します。この項目が Reports API で並べ替え列およびページ分割カーソルとして使用されている場合、lessThan 検索条件では、数値的または確定的な ID 比較ではなく、大文字と小文字を区別する文字列比較が実行されます。
CASESAFEID() で生成される 18 文字の Salesforce ID には、大文字と小文字が混在しています。ページ分割中に大文字と小文字を区別する語彙比較が実行されるため、API コール間で並べ替え順に矛盾が生じる可能性があります。その結果、次の問題が発生する可能性があります。
この動作は、特に次の場合に発生します。
lessThan 検索条件を使用して実装されている。CASESAFEID(Id) を使用する Text 型の数式項目に基づいて並べ替えが行われる。この問題を回避するには、Reports API 連携において、CASESAFEID(Id) 数式項目を並べ替えやページ分割カーソルの項目として使用しないことをお勧めします。代わりに、次のような安定した確定的項目を使用してください。
Id)これにより、ページ分割動作の一貫性が確保され、大規模なレポートエクスポート中にレコードが欠落するのを防ぐことができます。
関連情報
https://help.salesforce.com/s/articleView?id=platform.customize_functions_casesafeid.htm&type=5
005321970

We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.