+ Start a Discussion
eshhheshhh 

soql query for retrieving images in attachments

I want to retrieve Images from notes and attachments except other notes like pdf,text... how can we write soql query
SFDC_DevloperSFDC_Devloper
Hi..Hope this will help ..

<pre>SELECT Id,Name FROM Attachments where ParentId ='id of the record for you want to query related attachments for' AND WHERE ContentType IN ('image/bmp', 'image/gif', 'image/jpeg', ...)</pre>


Thanks,
Allways Cool
Ganesh RajputGanesh Rajput
SELECT ContentDocument.FileType FROM ContentDocumentLink WHERE LinkedEntityId = :currentRecordID

 
MN_sfdcMN_sfdc
Hi eshhh,

Have you resolved it? I have the same requirment.