You need to sign in to do that
Don't have an account?
Anvesh Singh
ContentDocumentLink Limitations when querying using LinkEntityId as filter
Hi All, my apologies if this has been asked somewhere else. I didn't find any answer hence I have to post this question.
USE CASE:
I am using database.query(queryString);
In queryString = 'SELECT id,linkEntityId,ContentDocumentId FROM ContentDocumentLink WHERE linkEntityID IN :listofRecords';
Here "listOfRecords" is a set of Ids (approx 5000 ids).
The above query returns only 6 contentDocumentLink.
But my org has more than 6 contentDocumentLink for those "listOfRecords".
How do I know if there are more than 6 files?
Because when I run the same query with selected linkEntityIds or hardcoded linkEntityIds (10 "listOfRecords") I get more than 6 records.
Question
So anyone has any idea is there any limitation on LinkEntityId when used as a filter in ContentDocumentLink?
USE CASE:
I am using database.query(queryString);
In queryString = 'SELECT id,linkEntityId,ContentDocumentId FROM ContentDocumentLink WHERE linkEntityID IN :listofRecords';
Here "listOfRecords" is a set of Ids (approx 5000 ids).
The above query returns only 6 contentDocumentLink.
But my org has more than 6 contentDocumentLink for those "listOfRecords".
How do I know if there are more than 6 files?
Because when I run the same query with selected linkEntityIds or hardcoded linkEntityIds (10 "listOfRecords") I get more than 6 records.
Question
So anyone has any idea is there any limitation on LinkEntityId when used as a filter in ContentDocumentLink?
Thanks for the quick reply. But this also didn't solve the problem.
What I did:
- I created a permission set (with "Query All Files") and assigned to the user from which I was running the query.
- And then ran the query. But still, didn't get all the files.
Workaround:But this is not a nice workaround.
So I am still open to any more suggestions.