- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-23-2025 09:29 PM
Good morning.
On a Catalog Form, I have a Workflow. The requirement is on RITM, whenever the person closes the REQTASK, the same person should be added the Approver on RITM.
How can we do this? Through User Approval - Run script? (Screenshot below). Instead of Group approval, I want the same person who closes the REQTASK to be the approver on RITM, so that, once he approves, the next stages in Workflow proceed.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-23-2025 10:02 PM
you can use user approval activity and use script
answer = [];
var req = new GlideRecord('sc_task');
req.orderByDesc('sys_created_on');
req.addQuery('active', 'false');
req.addQuery('request_item', current.sys_id);
req.setLimit(1);
req.query();
if (req.next()) {
answer.push(req.closed_by.toString());
}
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-23-2025 10:02 PM
you can use user approval activity and use script
answer = [];
var req = new GlideRecord('sc_task');
req.orderByDesc('sys_created_on');
req.addQuery('active', 'false');
req.addQuery('request_item', current.sys_id);
req.setLimit(1);
req.query();
if (req.next()) {
answer.push(req.closed_by.toString());
}
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-23-2025 10:43 PM
Sure Ankur. I will try out and will let you know. Thanks a lot.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-23-2025 10:47 PM
Thank you for marking my response as helpful.
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-24-2025 01:40 AM
Thanks a lot Ankur. It worked. Really appreciate.