changesTo() function not working for a business rule.

Saumya Awasthi
Kilo Contributor

Hi, my business rule configuration is as below.

when to run - before insert, update

script: 

var type;

if(current.assignment_group.changesTo('abc'))

{

type = 2;

}

The assignment_group is a reference field on the table. The above piece of code is not running for me. 

I am trying to do something like this - current.Display_value_of_Assignment_group.changesTo('abc').

Can anyone please help in explaining if this is achievable and how changesTo() function work with reference fields. 

Thank you!

6 REPLIES 6

You can also try this; it would be better I guess.

if(previous.assignment_group.getDisplayValue() != 'abc' && current.assignment_group.getDisplayValue() == 'abc'){

}

Muhammad Khan
Mega Sage
Mega Sage

Did you also try using this

find_real_file.png