How can I copy (duplicate) an attachment via a flowchart or workflow, without keeping the same ID when copying it to another record?
Duplicate attachment to another record
Collapse
X
-
You need to create a new Attachment record with 'sourceId' set to the sourceId of the Attachment record you copy or the id of the sourceId is empty.
Code:$sourceId = $attachmentAttributes['sourceId'] ?? $attachmentAttributes['id'];
If you find EspoCRM good, we would greatly appreciate if you could give the project a star on GitHub. We believe our work truly deserves more recognition. Thanks. -
In Workflows, when using UI for copying field, copying File and Image field was not implemented (it was only for Attachment-Multiple). I'll add it the next hotfix version.
It's also possible to use formula to copy attachment – in Create/Update record actions.If you find EspoCRM good, we would greatly appreciate if you could give the project a star on GitHub. We believe our work truly deserves more recognition. Thanks.Comment
Comment