Populating caller location using default value
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-18-2022 04:33 AM
Hi All,
I want to populate the incident caller's location on location field using the default value.
I tried with javascript:gs.getcaller_id().getRecord().getDisplayValue("location"); but it is not working.
Can you please help how can I achieve this ?
Note: Location field created on task table.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-19-2022 06:05 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-18-2022 05:02 AM
Hi,
you want to populate location for caller user or logged in user?
Are you populating caller with logged in user by default?
if yes then update this in your default value for location field
javascript: gs.getUser().getLocation();
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
08-18-2022 05:30 AM
no, we are not populating caller with logged in user by default.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-18-2022 05:36 AM
Check my update, you can do with dot walking of caller field
Regards,
Musab
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-19-2022 05:53 AM
Hi,
then how do you want to populate location for logged in user?
if yes then I already shared the approach
javascript: gs.getUser().getLocation();
If not then please discuss with your customer for correct requirement.
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
