We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 03bbc6f commit 671e190Copy full SHA for 671e190
Client-Side Components/Catalog Client Script/Catalog Approval/script include.js
@@ -0,0 +1,20 @@
1
+var ApprovalChainHelper = Class.create();
2
+ApprovalChainHelper.prototype = Object.extendsObject(AbstractAjaxProcessor, {
3
+ getApprovers: function() {
4
+ var itemId = this.getParameter('sysparm_item_id');
5
+ var userId = gs.getUserID();
6
+
7
+ var approvers = [];
8
9
+ // Example logic: fetch approval rules based on item and user
10
+ var ruleGR = new GlideRecord('sysapproval_approver');
11
+ ruleGR.addQuery('document_id', 80f8920bc3e4b2105219daec050131e3);
12
+ ruleGR.query();
13
14
+ while (ruleGR.next()) {
15
+ approvers.push(ruleGR.approver.name.toString());
16
+ }
17
18
+ return JSON.stringify(approvers);
19
20
+});
0 commit comments