If I have the following notes in salesforce:

enter image description here

How do I query it with SOQL?

I cannot get the data with the following query:

"SELECT Body, IsDeleted, IsPrivate, OwnerId, ParentId, Title FROM Note"

Is there something else I have to do?


This is not Note object. It is ContentDocument object.

You can query like

[SELECT Id,LinkedEntityId,ContentDocumentId, ContentDocument.Description
             FROM ContentDocumentLink 
             WHERE LinkedEntityId='00Q9000000PjzOm'];

LinkedEntityId is the record id. Pass your record id

| improve this answer | |
  • Aah, okay, but where in the interface can I find the notes? – user171162 Dec 4 '15 at 12:15
  • notes and attachment ? SELECT Body, IsDeleted, IsPrivate, OwnerId, ParentId, Title FROM Note this is for note. – Ratan Paul Dec 4 '15 at 12:18
  • No, I mean in the interface of the website, it's very unclear how notes are to be viewed – user171162 Dec 4 '15 at 12:23
  • open your record above link called Edit layout click on link. goto related list and add notes and attachment related list in page layout. Now in related list of your record you can see notes and attachment record. – Ratan Paul Dec 4 '15 at 12:26

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.