August 2017
Intermediate to advanced
1330 pages
56h 17m
English
Aside from before business rules, we also alluded to after business rules, which execute, as you might expect, after a database action is completed. Since before business rules execute before the record is saved to the database, any changes made to the current object are automatically saved to the database. Here's an example of that:
if (current.getValue('state') == '5') { current.setValue('active', 'false'); }
When using a "before" business rule, there's no need to call the update() method on the current object, because it's about to be saved to the database anyway! However, with "after" business rules, you'll need to call update() to submit the new data in the current object like so:
if (current.getValue('state') ...Read now
Unlock full access