logged in user should be set to caller field
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-09-2022 02:49 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-09-2022 02:53 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-09-2022 03:04 AM
Hi Anusha,
At the dictionary level of caller field set the default value as javascript: gs.getUserID()
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-09-2022 03:14 AM
Hi,
there can be 3 ways in which this can be done
You can decide which approach to take
1) Dictionary default value
javascript: gs.getUserID();
OR
2) On load client script on that table
function onLoad(){
if(g_form.isNewRecord()){
g_form.setValue('caller_id', g_user.userID);
}
}
OR
3) Display business rule on that table
(function executeRule(current, previous /*null when async*/) {
// Add your code here
if(current.isNewRecord())
current.caller_id = gs.getUserID();
})(current, previous);
If my response helped please mark it correct and close the thread so that it benefits future readers.
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-06-2022 01:24 AM
thanks, this worked!