Change - Prevent Requester from Approving

J_ Greene
Kilo Expert

I've read through many of the existing threads, but they don't seem to solve this issue completely. Here are the primary requirements:

  1. Change requester cannot be an approver at any stage in the workflow
  2. Approval record needs to remain for audit trail purposes
  3. An 'Request Approval' email SHOULD NOT be sent to the approver if the requester

I've created the following business rule, however, it is not working.

find_real_file.png

1 ACCEPTED SOLUTION

In my testing, the above solution stops ALL emails from being sent. As a result, valid approvers are not receiving the email.

This can probably be done in an easier way, but the following solution solves my requirements.

Business Rule #1

  • Table : Approval [sysapproval_approver]
  • When to run : before update

find_real_file.png

Business Rule #2

  • Table : Change Request [change_request]
  • When to run : after insert/update

find_real_file.png

Email Notification #1

  • Table: Approval [sysapproval_approver]
  • Category : Approval
  • When to run : after insert/update

find_real_file.png

 

View solution in original post

12 REPLIES 12

BryanS413339635
Tera Guru

We faced this same issue but decided to handle it through monitoring and training as opposed to trying to code for it. We created exception reports that monitor when the approver is same as the requestor and when this happens, the Change Manager follows up with them to discuss the proper process. 

 

If my reply has helped in any way, kindly mark it as helpful/correct. Thanks!

Anusha Reddy1
Giga Expert

 

Hello Jeg,

Please have the conditions checked in"when to run" tab to cancel the approval record, if requester is one of the approvers.

Hope this helps.

find_real_file.png

find_real_file.png

Sagar Pagar
Tera Patron

Hello JEG,

 

To prevent the Change requester to approve his/her own Change request. You could handle it at workflow level. You should use the Approval user activity with Advanced option and use the below script.

Approval user activity:

find_real_file.png

Advanced script:

answer = [];

var approvers = new GlideRecord('sys_user_grmember');
//approvers.addQuery('group', 'Approval Group'); 
approvers.addEncodedQuery('group.name=Approval Group');
approvers.query();
while(approvers.next()) {    
	if(approvers.user.toString() != current.requested_by.toString()) {
		answer.push(approvers.user.toString());
	}
}

 

It will help to send the approval for group members when it is not a Change requester. If Change requester is a member of approval group then approval is not send to Change requester or owner.

 

I hope this will help you.

Thank,

Sagar Pagar

The world works with ServiceNow

That doesn't work in our configuration, as we are using an Approval Policy.

find_real_file.png