- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-18-2020 08:41 AM
Hi,
I'm trying to copy attachments from one record to another using flow designer and unable to do it.
For example, I have attachment on problem record and have created problem task, now i want to copy the attachment from problem to problem task once task is created.
Below are the steps trying in flow designer.
Step1: trigger condition given as record created in problem task table.
Step 2: Searching for the problem table in sys_attachment table
Step 3: copying the attachment from step 2 lookup record to the problem task record in problem task table.
And it is not copying the attachments from problem to problem task.
Can any one please help me on this.
Solved! Go to Solution.
- Labels:
-
Multiple Versions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-18-2020 11:20 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-18-2020 09:26 AM
Hello Sriniwas,
Better to create "Copy-attachment" action and use in main flow to copy the attachment from source to destination.
Create inputs variables,
used in Script step:
(function execute(inputs, outputs) {
// ... code ...
var copyAttachment = new GlideSysAttachment();
copyAttachment.copy(inputs.sourceTable, inputs.sourceId, inputs.targetTable, inputs.targetId );
})(inputs, outputs);
and used in main flow, Changed as you need to copy attachment from Problem record to Problem task.
Thanks,
Sagar Pagar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-18-2020 11:10 AM
Hi Sagar,
Thanks for the reply.
have created the new action as suggested.
Action Inputs:
Action Script:
Trigger Point: when the record created in problem task table
Calling Custom Action created at step 1:
Still unable to copy attachments from problem to problem task.
Not sure, where is the mistake in the steps.
Thanks,
Sriniwas
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-18-2020 11:20 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-07-2020 10:30 AM
Thank you, it is working perfect.