Skip to content

Commit 3da240b

Browse files
authored
Add DomainCheckUtil to retrieve current domain name
1 parent 97fd3dd commit 3da240b

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
var DomainCheckUtil = Class.create();
2+
DomainCheckUtil.prototype = Object.extendsObject(global.AbstractAjaxProcessor, {
3+
//get current domain of user session
4+
getCurrentDomainName: function() {
5+
var sessionDomainId = gs.getSession().getCurrentDomainID();
6+
var gr = new GlideRecord('domain');
7+
if (gr.get(sessionDomainId)){
8+
return gr.name;
9+
}
10+
//Return global domain name
11+
return 'Global';
12+
},
13+
14+
type: 'DomainCheckUtil'
15+
});

0 commit comments

Comments
 (0)