How to add list of approver details on RITM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-20-2024 04:07 AM
Hi Team,
how to add list of approvers on ritm as a single comment
or anyway to inform about approver to the end user that request is pending with so on so approver
please advice
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-20-2024 04:37 AM
Hi @Ramu8 ,
Approval recors will get created based on flow configured, in the initial you will not come to know who all are in approval list but you can display the stage of ritm.
You need to configure the stage name in flow so that it will reflect on ritm as well.
Configure like
1. Pending with line manager.
2. Pending with IT department and so on..
-------------------------------------------------------------------------
If you found my response helpful, please consider selecting "Accept as Solution" and marking it as "Helpful." This not only supports me but also benefits the community.
Regards
Runjay Patel - ServiceNow Solution Architect
YouTube: https://www.youtube.com/@RunjayP
LinkedIn: https://www.linkedin.com/in/runjay
-------------------------------------------------------------------------
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-20-2024 04:39 AM
Hi @Ramu8
Request Management/change management are modules which heavily use the flow and approvals. Not sure what is your use case to show whose approval is pending at the RITM level? It can be seen in the OOTB related list, also till the time approval not generated you cant see whose approval is pending.
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.
Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]
****************************************************************************************************************
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-20-2024 05:18 AM
Hello @Ramu8
Totally agree with @Dr Atul G- LNG & @Runjay Patel that approval records will be created based on how the flow is configured. You cannot see all the approvers at once as it gets created sequentially.
However, you can write business rules in sys_req_item table to update the comments field with list of approvers where the state is requested.
(function executeRule(current, previous /*null when async*/) {
// Get the list of approvers (e.g., from the approval related records)
var approvers = [];
var approvalGr = new GlideRecord('sysapproval_approver');
approvalGr.addEncodedQuery("state=requested^sysapproval=" + current.sys_id);
approvalGr.query();
while (approvalGr.next()) {
approvers.push(approvalGr.approver.getDisplayValue());
}
// Add approvers to the comment field on the RITM
if (approvers.length > 0) {
current.comments = 'Approval is pending from: ' + approvers.join(', ');
current.update();
}
})(current, previous);
Result:
Hope this helps!
"If you found my answer helpful, please like and mark it as an "accepted solution". It helps others find the solution more easily and supports the community!"
Thank You
Juhi Poddar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-22-2024 08:14 PM
Hi @Juhi Poddar
you are right! as i have so many catalog items i cannot change each flow could you please suggest which br and condition