Need to change the status & substatus in RITM , once approver approve the request through outlook
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
4 hours ago
Hi Community,
This was the notification created on "sc_Req_item" table . So , here whenever user click on the link from body to approve through outlook mail, then it should automatically change the sub status in ritm . How it is possible here ? please help ! @Ankur Bawiskar
Request : ${number} is waiting for your approval
Requested By: ${u_requested_by}
Description of Request and Business Justification/ Case: ${u_cr_details}
Click here to view Request: ${URI_REF}
${mailto:approval}
${mailto:rejection}
${mailto:moreinfo}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 hours ago
you can use after update BR on sysapproval_approver table
Condition: current.source_table == 'sc_req_item'
Script:
(function executeRule(current, previous /*null when async*/ ) {
// Add your code here
var rec = new GlideRecord('sc_req_item');
rec.addQuery('cat_item.name', 'Your Item Name Here');
rec.addQuery('sys_id', current.sysapproval);
rec.query();
if (rec.next()) {
rec.u_substatusField = 'your value'; // give your value here
rec.update();
}
})(current, previous);
💡 If my response helped, please mark it as correct ✅ and close the thread 🔒— this helps future readers find the solution faster! 🙏
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 hours ago
@Ankur Bawiskar it's not changing when we are approving through outlook email
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 hours ago
1 more thing, BR should be after update
Condition: State Changes To Approved
Try to debug as well by adding gs.info()
💡 If my response helped, please mark it as correct ✅ and close the thread 🔒— this helps future readers find the solution faster! 🙏
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
