Business Rule only runs when checkbox is checked but it should always run?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-04-2019 10:53 AM
I have a simple business rule that adds 2 error values to my and aborts a save. It's a simple script:
(function executeRule(current, previous /*null when async*/) {
current.setAbortAction(true);
var gdt = new GlideDateTime(current.ap_end_of_support_date.toString() + ' 00:00:00');
gdt.addDaysLocalTime(365);
current.ap_end_of_support_date.setError("Error: " + current.ap_end_of_support_date + ' ' + gdt);
current.setAbortAction(true);
current.wpa2_psk_using_aes.setError('Encryption is required');
})(current, previous);
Here's the rule:
Now, when I run it on the form it works fine. If I check the AES true/false checkbox, it stops running the rule. The rule should always run and should always prevent the form submission. Why is it only running based on the checkbox state? This does not make sense.
This is the only business rule defined on the table, which is a custom table inheriting from nothing in a scoped app. The app has only 1 table. Here is an animation of how it is (not) working:

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-04-2019 12:39 PM
Check if you a business rule that is stopping from other rules to run.
Search in business rule script if you have setWorkflow(false)