Business Rule to change a State field

122932
Tera Expert

Hi


I need to create a Business Rule where the State field is equal to "10", the same State field will change to "Open"

my Script:

(function executeRule(current, previous /*null when async*/) {

// Add your code here

if(current.state == '10'){

current.setValue('state', Open); // use valid choice value

}

if(current.state == '9'){

current.setValue('state', Close); // use valid choice value

}

})(current, previous);

 

Tks!

1 ACCEPTED SOLUTION

Hi Julio, Is this issue fixed or your looking help How these are calling by label or value ?? Thanks Chandu Telu

View solution in original post

6 REPLIES 6

Hi Julio, Is this issue fixed or your looking help How these are calling by label or value ?? Thanks Chandu Telu

Hi,

I used a BR to change the field.

Thanks.