• Sahana Shahul
  • NEWBIE
  • 0 Points
  • Member since 2019

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 0
    Replies
Hi,

I have tried to show list of related Case files(Content Documents) in a lightning component on Account page. While querying I got 12000 related case records for a account. Now I have to fetch the Content Document IDs through Content Document Link. When i run the below SOQL I am getting only few Content Document Link records but I have 11 case records which are having files. The below query results only 5. Is there a limitation on WHERE clause or ContentDocument Link while querying huge number of records?

CaseList=SELECT id FROM Case WHERE AccountId=:accID // This results 12000 case records
List<ID> caseIDs=new List<Id>();
For(Case c:CaseList)
{
                 caseIDs.add(c.Id);

}
SELECT LinkedEntityId,LinkedEntity.Name, ContentDocumentId FROM ContentDocumentLink WHERE LinkedEntityId=:caseIDs // This results only 5 records but we have 11 ContentDocuments

Thanks in advance.