If "Requested for " and same requested for if member of the group approval

nameisnani
Mega Sage

Hi Team , 

 

can any one please help me in this requriemnt .

 

If "Requested for "  and same requested for if member of the group approval of the same catalog then requested for user shouldn't be able approve the request instead it should abort with some error message. 

 

Please provide correct script or BR or Flow steps to achieve this snieriao , i have already pasted in communtiy , not working , 

 

can any one please provide correct scirpt . with testing results with screenshots for better understanding ,

 

NOTE - our requirment is 

 

If "Requested for "  and same requested for if member of the group approval of the same catalog then requested for user shouldn't be able approve the request instead it should abort with some error message. 

 

Please provide configuration screenshots .

7 REPLIES 7

Ankur Bawiskar
Tera Patron
Tera Patron

@nameisnani 

you can use before insert BR on sysapproval_approver table and check this and abort the record insertion

what did you start with and where are you stuck?

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

nameisnani
Mega Sage

Hi @Ankur Bawiskar ,

 

I have configured like this 

 

nameisnani_0-1717040566145.png

nameisnani_1-1717040600122.png

nameisnani_2-1717040628824.png

 

 

could you please provide me the correct script for my requriment .

 

If "Requested for "  and same requested for if member of the group approval of the same catalog then requested for user shouldn't be able approve the request instead it should abort with some error message. 

 

 

@nameisnani 

don't use condition to check the approver

In script just get the RITM sysId and query and get the Requested For and match it against current.approver

then stop the record

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

@Ankur Bawiskar 

 

could you please provide me the correct script @Ankur Bawiskar  please