0

I need to search for Partner Accounts that don't have a Partner Agreement attached in the Files section. To find that, I believe the best way is to get a list of all Files attached to the Accounts that match the criteria. I managed to get a list of Files ID, but that is a bit useless for my purpose, what I really need is to include the Title in the results. Is this possible?

Here is my query so far, but I get an error saying

INVALID_FIELD: SELECT ContentDocumentID, ContentDocumentLinks.Title FROM ^ ERROR at Row:1:Column:27 Didn't understand relationship 'ContentDocumentLinks' in field path.

SELECT ContentDocumentID, ContentDocumentLinks.Title 
FROM   ContentDocumentLink 
WHERE  LinkedEntityId IN
  (SELECT ID FROM Account 
  WHERE   Type = 'Active Partner (signed contract)' 
  OR      Type = '2-Tier Partner')

Any help would be much appreciated.

1
  • Do you want to fetch document's Title? Did you try using this name 'ContentDocument.Title' instead of ContentDocumentLinks.Title Commented Nov 9, 2017 at 11:51

1 Answer 1

0

There is not Title on ContentDocumentLink, availible fields are documented here

You could instead query the LinkedEntity.Name or the ContentDocument.Title if that hepls:

SELECT ContentDocumentID, LinkedEntity.Name, ContentDocument.Title
FROM   ContentDocumentLink 
WHERE  LinkedEntityId IN
  (SELECT ID FROM Account 
  WHERE   Type = 'Active Partner (signed contract)' 
  OR      Type = '2-Tier Partner')
0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .