- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-19-2017 08:03 AM
How do I get the currently selected Domain for a user session, for use in a Business Rule (or other server-side script)?
Using gs.getUser().getDomainID() will return the user's assigned Domain, not the one they've selected in the Domain picker.
I would like to be able to get the Domain that they have selected in the Domain picker.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-19-2017 08:40 AM
var s = gs.getSession();
//id of current selected domain
var id = s.getCurrentDomainID();
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-19-2017 08:40 AM
var s = gs.getSession();
//id of current selected domain
var id = s.getCurrentDomainID();
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-19-2017 09:08 AM
Thanks Thaddeus.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-19-2017 09:06 AM
Sorry. False alarm.
I was checking the value via a Scheduled Job. That is not tied to a user session.
When I use gs.getUser().getDomainID() in a Business Rule, it does indeed show the currently selected session Domain.