Skip to main content
Chad Joubert ha fatto una domanda in #Apex
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.

 
1 risposta
  1. 11 set 2016, 06:57

    You could start from the child relationship :

    SELECT ContentDocumentId,ContentDocument.Title, ContentDocument.ContentModifiedDate, ContentDocument.ContentSize FROM ContentDocumentLink WHERE LinkedEntityId = '00655000007PiSd'

     
0/9000