SD5 - UI Rules now fire in Background (and from DB Rules)
This post is for info only.
Major change in V5 (from V4.5) is that UI rules now fire outside the GUI - ie can be fired by inbound emails, Data Exchange, Update all.....and even by fields changed by DB rules. This can be good - but because it's not well publicised in the doco, it can can cause a lot of pain and time wasted if you are not aware of it (as it did for us). This also means that it if you want to be sure a rule only fires in the GUI you must make the UI rule trigger on "before a field loses focus", and not on "When value changes"?
Here is what HP had to say after we logged it: -------------------------------- Basically, some UI rules will now fire in other situation than just with the UI. The following are some explanations:
UI-rules with the following triggers are fired in the background: - When a value has changed - After an item has been opened - After new item has been opened - After existing item has been opened - Before the item is saved
UI-rules with the following triggers are NOT fired in the background: - Before the form is closed - After a field gets focus - Before a field loses focus
The following actions in UI rules are executed in the background: - Update Data - Limit field value range - Data exchange with external system - Command Exec Action (executed on Server by default)
The reasoning behind this change is that -- "This was done because customers have a hard time getting the appropriate data into the system when other interfaces than the SD Client are used. For example, if a UI Rule updates the value of a field when a certain status is set, this should also be done when that status is set via a database rule or a Web-API call or via the SD Service Pages or via the email interface (in case of Service Call) or via SD Event (now called OvObsLoadObject). With SD4.5, customers had difficulty synchronizing data in records because a UI Rule would only fire when the SD Client was used." ----------------------------------- So now you know - you need to careful when designing rules to be aware of this. Hope that is useful information.....Ken.