- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-29-2020 09:38 AM
Hi all,
I tried auto populating the 'cost center' field value from users table, using the getReference method in business rule for incident form, but it didn't worked at all.
Please help me in retrieving the value of the cost center field value in the incident form
Solved! Go to Solution.
- Labels:
-
Incident Management

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-29-2020 10:28 AM
Hi Naresh,
As suggested by Ankur above won't work in business rule as g_form.getReference() are client specific side options to be used.
Try using below business rule that runs After Insert on required table & make sure you have correct field name passed.
(function executeRule(current, previous /*null when async*/ ) {
// Add your code here
current.location = current.caller_id.location;
current.cost_center = current.caller_id.cost_center;
current.state = current.caller_id.state;
current.city = current.caller_id.city;
current.country = current.caller_id.country;
current.update();
})(current, previous);

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-29-2020 12:29 PM
Hi Naresh,
Is this in your Demo instance? As strangely I could not find the user named in ABRAHAM LINCOLN in my PDI. Kindly check if the street, location, etc. is populated for the user on the User table.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-29-2020 12:49 PM
For some callers only country field value is not autopopulating.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-29-2020 12:56 PM
Can you check for those Users if you have it corrrectly populated in User table once.
Try adding all the fields on the form layout & give it a check if the values itself exist for required fields that you want to copy values from.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-29-2020 01:01 PM
BTW, these posts might help when posting questions in the future:

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-29-2020 12:07 PM
If you have a reference to the User record with Caller, why not just add the fields from the Caller(+) to the form, rather than creating redundant fields and attempting to script them. You'll want to make them read only on the form/list, if a user changes them on the Incident form, it will change them on the user record.
It's best practice to navigate users to the pop-up for the Caller reference field to view these fields, but if necessary to show them on the incident form the above method can be used.