Skip to content

Commit e6df91f

Browse files
authored
Create Script Include
moved from server component folder
1 parent 6b6adfa commit e6df91f

File tree

1 file changed

+19
-0
lines changed
  • Client-Side Components/Catalog Client Script/MRVS dependent ref qual 1st row

1 file changed

+19
-0
lines changed
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
var AccountUtils = Class.create();
2+
AccountUtils.prototype = Object.extendsObject(AbstractAjaxProcessor, {
3+
4+
//Populate the department name from the account in the session data for the reference qualifier to use:
5+
6+
setSessionData: function() {
7+
var acct = this.getParameter('sysparm_account');
8+
var dept = '';
9+
var acctGR = new GlideRecord('customer_account'); //reference table for Account variable
10+
if (acctGR.get(acct)) {
11+
dept = '^dept_name=' + acctGR.dept_name; //department field name on account table
12+
}
13+
14+
var session = gs.getSession().putClientData('selected_dept', dept);
15+
return;
16+
},
17+
18+
type: 'AccountUtils'
19+
});

0 commit comments

Comments
 (0)