How can we decide that a given 'before business rule' should be kept as it is or changed to 'after business rule'?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-06-2017 08:15 PM
Hello All,
According to ACE reports 'Before Business Rules' should not update() or insert() records on other tables. Now I have to decide whether I should keep the 'before business rule' as it is or change it to 'after business rule'. I wanted to know how to decide that.And I have a wierd code, it would be nice if someone could help me with this.
This business rule runs before insert and update and it is made on the table sysauto_db_check.The code is as shown below:
current.script = "var gr1 = new GlideRecord('ha_db_check');gr1.setValue('check_type',current.check_type);gr1.setValue('target_database',current.target_database);gr1.setValue('auto_repair',current.auto_repair); gr1.insert();";
Should this be kept as it is or changed to after business rule?
Regards,
Reeba

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-07-2017 03:31 AM
If there is no condition, it is always executed once a record is inserted or updated on this table.