In a Business Rule what should be the syntax of condition
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-01-2023 11:15 AM
Suppose in a business rule I want to add a condition on Advance option that it shoud only run on a particular table.
Please help me to write a code in condition field that the business rule should only run on a particular table.
Thanks
Utsav
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-01-2023 04:14 PM
Hi Utsav,
Table condition for Business Rule is not something which you put in condition field.
To make the Business Rule run on a particular table, you should specify it in the Table field on the top section of the form.
Best Regards,
Swarnadeep Nandy
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-01-2023 10:42 PM
@Utsav JAISWAL ,
I hope you are doing great!
Actually, when we have configured the business rule, we need to select the name of the table, so business rule is working on the update/insert/delete/query of that table, PFA screenshot
if still you want to add some condtions in Business rules, you can mention:
1) Simple condition like :
current.YOUR_FIELD_NAME == "YOUR_VALUE"
2) Also you can call script include from the condition field like:
new ScriptIncludeName().functionName();
And in the function of the script include, you can check your condition and return true/false accordingly;
If my answer solved your issue, please mark my answer as ✅Correct & 👍Helpful based on the Impact.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-01-2023 11:05 PM
Hi Utsav,
You can add your table into the "Table" field as mentioned in the Swarnadeep Nan1 post. Also, you can add table name in the advanced section as var gr = new GlideRecord('table_name');
Could you please elaborate more to help you on the same.
Please mark Correct and click the Thumb up if my answer helps you solved your issue. Thanks!
Thank you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-02-2023 03:04 AM
See I want to write a business rule with some condition in this "Condition" field.. @Shraddha Kadam
Can this be possible..If yes what should be the syntax on that field, so that it can only trigger on a particular table..