Skip to content

Commit d5abee3

Browse files
authored
Change approver for any record
I have seen many times; approvals go to another person. This script can help to change the approvers quickly.
1 parent 12c8338 commit d5abee3

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
var rec = new GlidRecord("sysapproval_approver");
2+
rec.addQuery("sys_id", "Provide the sys_Id of the record"); // Provide the sys_id of the record in which you want to change the approver.
3+
rec.query();
4+
if(rec.next()){
5+
rec.approver = "Provide the sys_id of the user"; // Provide the sys_id of the user for whom you want to trigger an approval
6+
rec.update(); // This will update the approver record.
7+
}

0 commit comments

Comments
 (0)