Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

How to get current domain name which is set by domain picker using script.

MH3
Tera Contributor

Hi All,

Is there any way where I can get the current domain name which is set in the domain picker using script.

 

Thank you in advance.

1 REPLY 1

Luke Van Epen
Tera Guru

I use this as a display business rule on the task table, very handy to have when needed.

 

g_scratchpad.user_domain = {id: gs.getUser().getDomainID(), display: gs.getUser().getDomainDisplayValue()};
g_scratchpad.task_domain = {id: current.sys_domain.getValue(), display: current.sys_domain.getDisplayValue()};