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
kartik.skartik.s 

Retrieving updated attachments from a record

Hello Everyone,

           I am working on an application where i need to regularly poll salesforce for record inserts and updates. I use the getUpdated API to catch all the updates and its works pretty well for me. But now i have to poll for attachments too. For now, i am using a query to retrieve the name and body of an attachment for a specific record  meaning i use the ID of the record and check if there are any attachments pertaining to this ID. This gets all the attachments associated with the mentioned ID.
          But now, i would like to poll all salesforce records for attachments and not just one record. Is there an API to poll all salesforce records for attachments? Also my current procedure, collects all attachments from a record, meaning it also picks up those records that i might have already picked up. So, it would be preferable to have only the updates, based on time perhaps.

Any thoughts on this would be really helpful. Thank you.
SuperfellSuperfell
getUpdated/getDeleted should work on the attachment sObject, just like any other.
kartik.skartik.s
Thanks for the update. I am doing as you suggested, using getUpdated to get the attachment. Thanks again. Wasn't aware that attachment was treated as an object. My bad...