- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-05-2017 06:05 AM
how can i do this exercise... Set up a department on your user record. Use a UI action to show an information message with the sys_id of your department in servicenow
kindly help me with your suggestions
Regards
Divya
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-05-2017 07:25 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-05-2017 06:19 AM
You pretty much have 3 options.
1. Use a UI Action with server code. This will thou save the record when you press the button. But this code would solve it:
var currentUser = gs.getUser();
gs.addInfoMessage(currentUser.getCompanyID());
2. Use a display Business Rule to put to company ID into the g_scratchpad and then call for it in the UI Action
3. User a GlideAjax call to find the sys_id and do a message with the response from it.
//Göran
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-05-2017 06:28 AM
Hi Goran,
thanks for the response if possible can you elaborate with that.
Regards
Divya
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-05-2017 06:28 AM
which one?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-05-2017 06:31 AM
1. Use a UI Action with server code. This will thou save the record when you press the button. But this code would solve it:
var currentUser = gs.getUser();
gs.addInfoMessage(currentUser.getCompanyID());