how to autopopulate caller's location and on behalf behalf of user location using BR???

naveenmyana
Giga Expert

Hi All,

I have two fields in my incident form, caller and On behalf of fields, Both are reffering to user table to select the user who is raising the incident and for whoom. And for both these fields location field is there and I need to auto populate bot these fields with the location based on the caller and on behalf of fields user.

I have done this via client script and is loading the location very slow and also sometimes the location is not populating in list view for some incidents, Can i do this via BR. Please help me out..

obo.PNG

2 REPLIES 2

Pradeep Sharma
ServiceNow Employee
ServiceNow Employee

Hello Naveen,



Create a BEFORE business rule with the script as



current.location = current.caller_id.location; //Assuming location and caller_id is the field column value on incident table.


Hi Pradeep,



I have tried the code you mentioned here, But it's not working somehow...