+ Start a Discussion

query attachments on an account

Is it possible to query attachments on an account.  I tried:


Select Title, Id from NoteAndAttachment WHERE ParentId = 'accountID'


Error: Query failed: Invalid Type for Operation: entity type does not support query




select ... from Attachment where parentId='...'


If you really want notesAndAttachments, rather than just attachments, then you can only query those in a child query, e.g.


select id,name, (select id.. from NotesAndAttachments) from account where id='...' 

Tushar BudheTushar Budhe
There is no data present in  NotesAndAttachments with the latest version. I can't see any data. They move data to the contentVersion table.