Friday, March 18, 2016

Business Rule vs Javascript

When intermixing JavaScript and Business Rules, it’s essential to note that they take different places in the sequencing of event handlers, depending on which event you’re concerned about. Business Rules execute during the On Load event of the Form, and during the On Change events of fields that are selected in their Conditions list. (Incidentally, this may be why the scope for Condition evaluation is so limited.


When the On Load event is triggered, Business Rules are evaluated first, followed by registered JavaScript methods. However, when a field’s On Change event is triggered, Business Rules are evaluated last, after all JavaScript methods have returned. This may be because JavaScript could be designed to alter fields that are specified in a Business Rule, so the Business Rule may not be applicable.

2 comments:

  1. I recently came across your blog and have been reading along. I thought I would leave my first comment. I don't know what to say except that I have enjoyed reading. Nice blog. I will keep visiting this blog very often. go to this site

    ReplyDelete
  2. Hi, thanks for the post, however I have a query

    A business Rule is async in nature, still will it execute before a JS ?

    ReplyDelete