1

I try to run next queries through REST API v39 using deveoper account

Select Id From ContentDocument where name = 'Test' and Description LIKE '%my cutom template%'

And

Select Name, LatestPublishedVersionId From ContentDocument Where Description Like '%my cutom template%'

Have next issue:

INVALID_FIELD:
Select Name, LatestPublishedVersionId From
           ^
ERROR at Row:1:Column:8
No such column 'Name' on entity 'ContentDocument'. If you are attempting to use a custom field, be sure to append the '__c' after the custom field name. Please reference your WSDL or the describe call for the appropriate names.

Where I'm wrong ?

2

You are getting the expected error. Many standard object don't have Name field like this one. So you need to remove Name from Query.

ContentDocument Reference

  • 1
    I'd like to call specific attention to the fact that the link in the answer is to the SOAP API documentation. Even if you aren't using the SOAP API, the documentation on it is an outstanding source of information. It tells you what objects Salesforce uses, whether or not you can query them with SOQL, the fields those objects have, and what (in CRUD) you can do with those fields. – Derek F Feb 5 '18 at 16:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.