function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Nicholas PlayoustNicholas Playoust 

Entity 'ContentDocumentLink' is not supported for semi join inner selects

Hi,

I'm attempting to create a SOQL query (to merge data via Conga).  Specificically, I would like to retrieve records from the object "ContentVersions" as they relate to Files (ContentDocument) attached to a custom object called (Transmittal).  I am retireving them from Transmittal. I have written the following:
 
SELECT v.Title, v.FileType
FROM ContentVersion v
WHERE ContentDocumentId in
(Select j.ContentDocumentId From ContentDocumentLink j
Where j.LinkedEntityId = '{pv0}')

My query returns the following error, "Entity 'ContentDocumentLink' is not supported for semi join inner selects".

The sturcture, as I understand it is:
Transmittal
ContentDocumentLink (creates a m to m relationship between the Linked Entity (here Transmittal) and ContentDocument.
ContentDocument
Content Versions

I have reviewed the Content Object schema.

Is the query incorrect, or is it not supported?  If not what is a work-around? (Sorry I'm an amateur).

Thank for your help.
RobAlexanderRobAlexander
not supported
Mark Brown 33Mark Brown 33
Did you ever get an answer? I have exactly the same problem :(