You need to sign in to do that
Don't have an account?
SOQL Parent-Child Help
Hey I still struggling writing a Parent-Child query for the Content object...
I'm trying to Return the ContentVersion Fields WHERE its Parent (ContentDocument) is in a particular Workspace...
I belive I need to access 3 tables.. ContentWorkspaceDoc, ContentDocument, ContentVersion. But I cannot seem to form a working SOQL that accesses these tables in one query. Can anyone help?
I consistently get an error: Didn't understand relationship 'ContentWorkspaceDoc'
When I look up the object it doesn't note a relationship name for the Joins, but the Diagram I posted above clearly shows there is a relationship.
SELECT Id, Title, ContentUrl, (SELECT ContentDocument.ContentWorkspaceDoc.Id FROM ContentDocument.ContentWorkspaceDoc WHERE ContentDocument.ContentWorkspace.Id = '05830000000TgTD') FROM ContentVersion WHERE PublishStatus = 'P' AND isLatest = true AND IsDeleted = false
Highlighted above is the bit I can't figure how to include.... I'm aware that ContentDocument Stands between Workspace and Version, but I can't figure the relationship notation.
Managed to get this working....
Trying to figure out how to use that relationship for SEARCH (SOSL) instead of SOQL now.