Setting value to company Field when caller is selected via Business Rules

Mr_Blue
Tera Expert

Hello Guys,

I am trying to Set value to company Field when caller is selected via Business Rules.

Table name : Incident

What i want is pasted in below image

find_real_file.png

But i am not getting Caller.comapny in the third field, please check below 

find_real_file.png

can someone please show me how to select that field 

1 ACCEPTED SOLUTION

AbhishekGardade
Giga Sage

Hello Bright,

You need to set value in script if you are trying to set value like above that is called a dot-walking of field.

Business Rule Script: I am here referring your business rule is written on Incident table and you want to set a value for company field

1. If your are using BEFORE INSERT/UPDATE Business Rule I 

current.company= current.caller_id.company :

2. If your are using AFTER INSERT/UPDATE Business Rule

current.caller_id = current.caller_id.company :

current.setWorkflow(false);

current.update();

Please mark as Correct Answer/Helpful, if applicable.
Thanks!
Abhishek Gardade

Thank you,
Abhishek Gardade

View solution in original post

1 REPLY 1

AbhishekGardade
Giga Sage

Hello Bright,

You need to set value in script if you are trying to set value like above that is called a dot-walking of field.

Business Rule Script: I am here referring your business rule is written on Incident table and you want to set a value for company field

1. If your are using BEFORE INSERT/UPDATE Business Rule I 

current.company= current.caller_id.company :

2. If your are using AFTER INSERT/UPDATE Business Rule

current.caller_id = current.caller_id.company :

current.setWorkflow(false);

current.update();

Please mark as Correct Answer/Helpful, if applicable.
Thanks!
Abhishek Gardade

Thank you,
Abhishek Gardade