Copy users from run script and send approval notifications to copied users
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-06-2024 10:05 AM
Hi Experts,
We have an requirement to send approval notifications to users returned via runscript in worflow, can you please help me with the solution/code.
Run script code:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-06-2024 10:27 AM
It's best to do this in the script of the Approval - User activity, so that the usr array is the approvers array. If you must keep it separate for some reason, 'usr' must contain sys_ids from the sys_user table, not email addresses. Once you have that array, copy it to a scratchpad variable
workflow.scratchpad.usrArr = usr.join(',');
Then in the Approval - User activity script, you can populate the approval array from the scratchpad variable, which is already a comma-separated string
answer = workflow.scratchpad.usrArr;