Working with Existing Attachments in Visual Workflow
You can manipulate attachments in visual workflow (i’m working with the old-fashioned attachments object, but this should work w/ files, which are stored as contentDocument / contentVersion / contentDocumentLink).
What works: manipulating existing attachments by looking up the attachment(s) and storing them in a sObject variable/collection, including the body field. Use assignment elements to set the ParentID to its new parent, and use a fast create to insert the sObject variable/collection.
What wont work: Doing anything with the body field, other than including it in a sObject variable/collection. For example, I tried to map a text variable to body and create a new text attachment, and that fails. Body is a base64 field type, and I have not found any flow field type that can map to it. So you can only lookup an existing attachment and change the parent ID - you cant create new
Continue reading →