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-18-2022 05:17 AM
but this will give the current logged in user location right ,
I want caller's location
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-18-2022 05:21 AM
just replace it to below
when you use current.caller_id then you can dot walk to any field on user table to access just like i did for location
javascript:current.caller_id.location
mark my answer correct if it helps you
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-18-2022 05:25 AM
but it is not working , it is not populating the location
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-18-2022 05:29 AM
If you are looking to populate location upon selection of caller_id, then use onChange client script on caller field.
var caller = g_form.getReference("caller_id", getCaller);
function getCaller(caller){
g_form.setValue("location", caller.location);
}
Aman Kumar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-18-2022 05:32 AM
ya I can use client script but the requirement is to set from default value only
