Can we set default domain of users so that they don't have to change it everytime they login?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-14-2024 02:25 AM
There is a domain field on user record but that tell what domain this user belong to. Is this same field that decides which domain a user will be in when logging in?
As a developer, I always have to change domain or I end up doing things in wrong domain by mistake. I want a default domain set for me and many other users so that when they login, they don't have to change it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-14-2024 02:43 AM
Hi @Chandler2
Yes, but as of now or OOTB it is showing global, if there is no domain separation activated.
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.
Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]
****************************************************************************************************************
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-14-2024 02:45 AM
- Navigate to the Script Action records (sysevent_script_action)
- Open the record with the name as 'Set Theme'.
- Do an insert and stay on this record and modify the name to 'Test Domain Picker' (or any)
- Make sure that the event name is session.established
- Add script as below
setDomainPicker();
function setDomainPicker(){
gs.getUser().setDomainID('sysid of the domain');
}
and save the record
6. Now, once the logs in the domain will be set to the value set in the setDomainID
☑️ Please mark responses as HELPFUL or ACCEPT SOLUTION to assist future users in finding the right solution....