On Validation

Fires the flowchart before a record is saved and works directly on the form implementing validation rules. It is possible to check whether some field contains a particular value, whether a value complies with a format, or check related records to the current one. For example: check whether a Case is in an appropriate status prior to sending an email to a Client, or whether mobile phone in Lead corresponds to format, or whether parent Bug status is in an appropriate status to close related Case.

Validation rules work in RecordView, on ListView, and subpanels in the Sugar Interface. Unlike On Data Change or On Link Change, On Validation doesn’t work when the record is saved on the server, e.g. through API. To implement rules for such save please see Throw Exception.

 Each On Validation flowchart must contain operator Add Validation Violation.

After the flowchart which starts from On Validation is deployed on the Sugar instance it is necessary to clean the browser cache so that implemented rule works.

inputs:

select from the list a module for which records validation rule is needed.

  • Required: yes

outputs:

entity – a record which user is saving. Here entity is in the state as it a user saves it. Commonly followed by Get Entity Attributes.

previous values – a record in a state of how it was before the most recent changes. Commonly followed by Get Entity Attributes and is compared with output from entity to check whether particular fields values were changed.

is new – contains true when the record is new or false when this is an update of the existing one

changed fields – a collection of fields system names that were changed. Unlike similar output from On Data Change, this port doesn’t contain fields like date_modified or modified_by as the record wasn’t saved yet

Click to rate this post!
[Total: 0 Average: 0]

Leave a Reply

Your email address will not be published. Required fields are marked *