- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-12-2023 06:31 AM
Hi,
I have created a custom action which calls a script include to retrieve an approver sys_id.
I can see from the logs that the sys_id is being returned however the approver record doesn't appear to be found.
I understand from looking at a post from @petercawdron that an approval record can be returned from a sys_id and then used in an Ask for Approval step.
I'm not sure if my outputs are not configured correctly or if I have missed something.
Any help appreciated, thank you!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-12-2023 06:33 AM
output variable is of type Reference and can hold only 1 value
I believe you are storing multiple approvers in it.
So you should use Type-> Array of objects instead of reference
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-12-2023 06:33 AM
output variable is of type Reference and can hold only 1 value
I believe you are storing multiple approvers in it.
So you should use Type-> Array of objects instead of reference
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-12-2023 08:20 AM
Actually, the approver is a single sys_id and it didn't seem possible to use the array.object with the Ask for Approval. So should I change the variable type in my script include from array to string, and should the output variable and action output both be of type reference.sys_user? Thanks