change approver name in requested approval record

yandp
Tera Guru

Hi all, 
i would like to get advice how to change the "Approver" in approval records?

i need to do this is custom application, user selected a wrong approver, i need to change the approver name requested.

can i do a common ui in the approval requested record to chnage the approver name?

as i see below the example the approver value is not editable.

after change the approver name here, do i need to change the approver name selected in the approving document?

Thank you.

yandp_0-1700319008967.png

 

2 REPLIES 2

Dr Atul G- LNG
Tera Patron
Tera Patron

Hi @yandp 

 

Greetings.

 

Practically,  once a change moved to approval state, adding new approver is not recommended. You must move the change back to new state and add the approved manually. Or in change in approved related list you will get option to add New approved,  you can use that buy again OOTB you need to see the conditions to activate thar.

 

This whole is a manual process and you need change manager role to do this. Once you added new approver you can move or update state to Requested and the wrong approver update state to cancel or no longer required.

 

Hope this will helpful.

*************************************************************************************************************
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]

****************************************************************************************************************

Danish Bhairag2
Tera Sage
Tera Sage

Hi @yandp ,

 

As Atulya mentioned once the request is submitted it is not a good practice to modify anything related to approval. It can cause issue with the flow. You can ask the requestor to cancel the request & raise a new one.

 

But let's say the client only wants the approver to be changed just this once. Being an admin u can either write a fix script or a background script to change the approver name to the desired one. You can try with script below:

 

var gr = new GlideRecord('sysapproval_approver');

if(gr.get('enter_sys_id_of_the_approval_record')){

gr.approver = 'enter_sys_id_of_the_user';//enter the sys I'd of the user who is actually suppose to be mapped

gr.autoSysFields(false);

gr.update();

 

Thanks,

Danish