Can someone please explain why IF condition is INCORRECT syntax for a condition script?

BANDI SAI KUMA1
Tera Contributor

 

While browsing the developer documentation on business rules, I found something I didn't quite understand. Why can't we use an `if` statement to check conditions in business rules? If we can't use an `if` statement, how can we evaluate a condition and perform other actions based on that condition?

 

 

BANDISAIKUMA1_0-1723095643728.png

 

1 REPLY 1

SGanguly
Tera Contributor

As it is already explained, the condition script field is asking for the value inside the if(...) condition. Basically it will validate the line if it is true. So if you mention current.short_description == "Hello world" in the field, in the backhand script should treat that line as if(current.short_description == "Hello world"). If you add an extra if, it becomes if(if(...)) statement.