Hello community how can I change current domain in the domain picker dynamicaly using ui script ?

khadija3
Tera Guru

Hello community how can I change current domain in the domain picker   dynamicaly using ui script ?

I have changed the user domain using gs.getUser().setDomainID(" ") but it did not changed the domain in the picker !:

thanks

1 REPLY 1

mansooromar
ServiceNow Employee
ServiceNow Employee

Hi Machhoud,



You would have to use server side script if you want to use Glide System. Perhaps a script include.


gs.getUser().setDomainID("enter_domain_sys_id") worked for me if I run it in background scripts.



Kind regards,


Mansoor Omar | Technical Support Engineer |   User Experience