How to attach approval in the Change Request table
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-31-2024 10:19 PM
Hi,
In the Change Request table, I have a field called 'QA' (Choice type), When the QA field is set to 'Yes' and the state changes to 'Assess,' I would like to add the 'Database Group' for approval. I do not want to modify the existing flow or workflow. How can I achieve this without changing the existing flows?
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-01-2025 02:53 AM
create new business rule on the change request table. set the trigger to after update with conditions: QA is yes and state changes to assess. use the condition in script.
if (current.qa == 'Yes' && current.state == 'Assess') {
var approvalGroup = new GlideRecord('sysapproval_group');
approvalGroup.initialize();
approvalGroup.approval = current.sys_id;
approvalGroup.group = 'Database Group Sys ID'; // Replace with the actual sys_id of the group
approvalGroup.insert();
}
then save and test.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-01-2025 01:20 PM
Hi @Hari S1
Best option is via Change approval policies which is low code.
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]
****************************************************************************************************************