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
samsonsamson 

WebAPI Bug?Only can retrieve one attachemnt from case?

It's really weird that I could only get one latest attachemnt when query case. But the case does have many attachments.
Following is my code:
 
binding.query("select Name,Body,BodyLength from Attachment where ParentId='50070000005KsNUAA0'");
 
Another thing is when I do the same search via Eclipse Salesforce.schema, it can get all the attachments.
What API does Eclipse use??
 
 
Thanks! It's really urgent for me , any comments are welcome!
 
 
SuperfellSuperfell
like all queries a batch size is in operation, and results larger than the batch size require calls to queryMore to fetch the remaining batches. When you select a blob field, like attachment body, the batch size is set to 1, so query will return the first row, and you need to call queryMore to get the remaining rows.
samsonsamson
Thank you Simon, you are the star!
 
It works fine when I use query more!