How to transfer approval request from one user to another using button.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-25-2023 01:56 AM
How to transfer approval request from one user to another user using button.
For eg:- I have a requirement were i need to transfer approval request from able tuter to alex.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-03-2023 12:43 PM
We had a similar requirement, our was Escalate the the Approver's Manager and set to Current Manager.
We created a UI Action button for each case and restricted the access to the Service Desk users.
Name: Escalate to Approver's Manager
Table: Approval [sysapproval_approver]
Condition: current.state == 'requested' && current.sysapproval.sys_class_name != 'wm_order'
Script:
var mgr_mgr=current.approver.manager;
if(mgr_mgr){
current.approver=mgr_mgr;
current.update();
}
Name: Reset to Current Manager
Table: Approval [sysapproval_approver]
Condition: current.state == 'requested' && current.sysapproval.sys_class_name != 'wm_order'
Script:
var gr=new GlideRecord(current.source_table);
gr.addQuery('sys_id',current.document_id);
gr.query();
if(gr.next()) {
var mgr = gr.requested_for.manager;
if(mgr!=current.approver && mgr){
current.approver = mgr;
current.update();
}
}
Hope this helps