Skip to content

Commit 669bc47

Browse files
authored
Create client script.js
1 parent 671e190 commit 669bc47

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
function onLoad() {
2+
var ga = new GlideAjax('ApprovalChainHelper');
3+
ga.addParam('sysparm_name', 'getApprovers');
4+
ga.addParam('sysparm_item_id', g_form.getUniqueValue());
5+
ga.getXMLAnswer(function(response) {
6+
var approvers = JSON.parse(response);
7+
var message = 'This request will be approved by: ' + approvers.join(', ');
8+
g_form.showFieldMsg('requested_for', message, 'info');
9+
});
10+
}

0 commit comments

Comments
 (0)