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
HoustonAPlusHoustonAPlus 

Query attachments with zksforce

Is there a simple example of querying attachments from a contact record using zksforce?

Best Answer chosen by Admin (Salesforce Developers) 
SuperfellSuperfell

ZKQueryResult *qr = [client query:@"Select id,name from attachment where parentId='contactId'"];

All Answers

SuperfellSuperfell

ZKQueryResult *qr = [client query:@"Select id,name from attachment where parentId='contactId'"];

This was selected as the best answer
HoustonAPlusHoustonAPlus

Thanks! but if the body is string of an image data, is there any gotchas I should be aware of? Thanks again

SuperfellSuperfell

You just need to base64 decode the string returned by body. There's various options, I normally use this approach http://www.dribin.org/dave/blog/archives/2006/03/12/base64_cocoa/