function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Avanish KAvanish K 

Not able to get all attachment data in single query

I want to get five attachment at once but when I use the body in the query it returns result size correct but only one record data show.
Select id,name, body contentType From Attachment
When I remove body than it returns correct data.
Select id,name, contentType From Attachment
Best Answer chosen by Avanish K
Avanish KAvanish K
It was a typo mistake. We can not retrieve multiple Attachment/file body in the single request like:
Select id,name, body, contentType From Attachment

In this query, we are getting only Attachment/File details so we can fetch multiple records details.
Select id,name, contentType From Attachment

Thanks

All Answers

sfdcMonkey.comsfdcMonkey.com
Select id,name, body, contentType From Attachment
try above query, use (,) after body

Thanks let us know if it helps you 
 
Avanish KAvanish K
It was a typo mistake. We can not retrieve multiple Attachment/file body in the single request like:
Select id,name, body, contentType From Attachment

In this query, we are getting only Attachment/File details so we can fetch multiple records details.
Select id,name, contentType From Attachment

Thanks
This was selected as the best answer