Wondering if there is anyway to query for LinkedEntityId from ContentVersion?
As i understand, ContentVersion looks up to ContentDocument which then looks up to ContentDocumentLink (could be wrong though).
When Querying for ContentVersion i attempt to look up LinkedEntityId (on ContentDocumentLink) using the following syntax
However this produces a didnt understand the relationship error. What am i missing?
Edit: The goal is the be able to relate the ContentVersions with the Entity they are linked to. After realizing ContentDocumentLink looks up to ContentDocument, this is what i've come up with
Select Id, (select Id, File_Type__c from ContentVersions), (select linkedEntityId from ContentDocumentLinks WHERE linkedEntityId ='001i0000018GQ6hAAG' AND linkedEntityId != null) FROM ContentDocument
The issue is that I am retrieving all the ContentDocuments that are not filled in (hence the != null, but thats not working). Though the linkedEntityId i used is being selected (ie. their are no other ContentDocumentIds, just nulls and ones with the linkedentityid in my example