You need to sign in to do that
Don't have an account?

Updating an attachment
Is there a way to replace an attachment with an updated version ?
Our company will be using sforce to share documents which are updated frequently. How would I be able to use Sforce to accomplish this task.
Thanks
Our company will be using sforce to share documents which are updated frequently. How would I be able to use Sforce to accomplish this task.
Thanks
Hi juventuss,
Sure, you can update attachments. There is an attachment object that contains fields like body, ownerid, parentid etc. Just open the new document, create a byte array by reading the document, set the body field to that array and update the attachment record. The parent Id controls which record the attachment is associated with.