- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-13-2024 08:56 AM
We are looking at a way for change management to automatically block the approval of a user if they are the requestor of a change, that way they cannot approve of their own change if they are in one of the review groups.
What is the best practice for this?
Solved! Go to Solution.
- Labels:
-
Change Management

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-13-2024 10:18 AM
@AdamRich Create a business rule on Approval[sysapproval_approvar] table as follows.
Hope this helps.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-13-2024 09:12 AM
Hi @AdamRich ,
1. Navigate to System Definition > Business Rules.
2. Click on New to create a new business rule.
3. Give the business rule a name, such as "Prevent Self Approval".
4. In the 'When to run' section, select 'before' and 'insert, update'.
5. In the 'Table' field, select 'Change Request [change_request]'.
6. In the 'Advanced' tab, write a script to check if the approver is the same as the change raiser. Here is a sample script:
(function executeRule(current, previous /*null when async*/) { if (current.requested_by == current.approver) { gs.addErrorMessage('You cannot approve your own change request.'); current.setAbortAction(true); } })(current, previous);
7. Click on Submit to save the business rule
This script will prevent the change request from being saved if the approver is the same as the person who requested the change. The 'gs.addErrorMessage' function displays a message to the user, and 'current.setAbortAction(true)' cancels the save operation.
If I could help you with your Query then, please hit the Thumb Icon and mark it as Correct !!
Thanks & Regards,
Sumanth Meda
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-13-2024 09:33 AM
Simply provided by @Sumanth16
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
03-13-2024 10:18 AM
@AdamRich Create a business rule on Approval[sysapproval_approvar] table as follows.
Hope this helps.