changesTo() function not working for a business rule.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-12-2022 01:16 PM
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!
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-12-2022 01:33 PM
You can also try this; it would be better I guess.
if(previous.assignment_group.getDisplayValue() != 'abc' && current.assignment_group.getDisplayValue() == 'abc'){
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-12-2022 01:21 PM