Query all Notes & Attachments #inSalesforce

All related Queries:

SELECT Id FROM Note 

SELECT Id FROM Attachment

SELECT Id FROM ContentDocument

SELECT Id, Title, Description, TextPreview FROM ContentVersion

SELECT ID, Name,(SELECT id,RecordType FROM CombinedAttachments AS S WHERE S.RecordType = 'Note' OR S.RecordType = 'Attachment') FROM Contact

select Id,Name,(SELECT Id, Name FROM Attachments),(SELECT Id, Title FROM Notes)from Contact 


Retrieve ContentNotes information along with LinkedEntity's information with SOQL -


SELECT Id, Title, LatestPublishedVersion.VersionNumber, LatestPublishedVersion.VersionData,

(SELECT LinkedEntityId, LinkedEntity.Name FROM ContentDocumentLinks)

FROM ContentDocument

Comments