Can someone please explain why IF condition is INCORRECT syntax for a condition script?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-07-2024 10:48 PM
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?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-07-2025 07:56 AM
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.