Setting the Default Location
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-26-2014 09:14 AM
Hi,
Does anyone know how i can get the location field to auto-populate with the customers location.
We previously had a default value and i have now removed this so the location shows as blank but I want to link this to the users location.
Any help or advice on this would be great.
Thanks in advance.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-13-2014 12:03 PM
Hi,
you can use an on-change client script to do this something like the below....
<code>
function onChange(control, oldValue, newValue, isLoading) {
if (isLoading)
return;
if (newValue == '') {
g_form.setValue("location", "");
return;
}
var caller = g_form.getReference("customer", setLocationFromCaller);
}
function setLocationFromCaller(customer) {
g_form.setValue("location", customer.location);
}
</code>

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-25-2014 03:54 AM
You can write an "After" business rule for the record table e.g. Incident and add below code in the same.
current.location = current.caller_id.location;
It should work fine.