You need to sign in to do that
Don't have an account?
Get all ContentDocuments for a given Entity through SOQL
I am looking to get several fields from the ContentDocuments object given an entity Id for the ContentDocuemntLink. The SOQLthat I am trying is: Select Title, ContentModifiedDate, ContentSize from ContentDocument
where Id IN (SELECT ContentDocumentId FROM ContentDocumentLink WHERE LinkedEntityId = '00655000007PiSd') but I get the error:
(SELECT ContentDocumentId FROM ContentDocumentLink WHERE LinkedEntityId
^
ERROR at Row:2:Column:44
Entity 'ContentDocumentLink' is not supported for semi join inner selects
I need this in SOQL because the call is coming from a .Net program. I can accomplish this will a second call but would like to be able to get the list in one call.
where Id IN (SELECT ContentDocumentId FROM ContentDocumentLink WHERE LinkedEntityId = '00655000007PiSd') but I get the error:
(SELECT ContentDocumentId FROM ContentDocumentLink WHERE LinkedEntityId
^
ERROR at Row:2:Column:44
Entity 'ContentDocumentLink' is not supported for semi join inner selects
I need this in SOQL because the call is coming from a .Net program. I can accomplish this will a second call but would like to be able to get the list in one call.
You could start from the child relationship :