Skip to content

Commit 6d9e930

Browse files
Create ApprovalScript.js
1 parent 48542b3 commit 6d9e930

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
var approval = new GlideRecord('sysapproval_approver');
2+
approval.addQuery('sysapproval', 'd2cdb552db252200a6a2b31be0b8f5ee');
3+
approval.query();
4+
5+
if (approval.next()) {
6+
// Set the new approver using the display name
7+
approval.approver.setDisplayValue('Beth Anglin');
8+
approval.update();
9+
10+
gs.info('Approver successfully updated to Beth Anglin for record: ' + approval.sysapproval);
11+
} else {
12+
gs.warn('No approval record found for sys_id: d2cdb552db252200a6a2b31be0b8f5ee');
13+
}

0 commit comments

Comments
 (0)