Editable Grid Validation - CloudFronts

Editable Grid Validation

Introduction:

In this blog we will be discussing about the Business Rule validation issue in  Editable grids caused when the fields are not present in the views.

Scenario:

In our demonstration we will take the example of a contact form and design a business rule to lock the email field if the Job Title field is blank.

Implementation:

Step 1: First we enable editable gird for the contact entity as shown in the image below.
Editable Grid

Step 2:  Then we create a business rule for the contact form  to lock the Email field if the Job Title field is blank. The Business Rule is shown below.

Business Rule 1

Step 3: Now in the editable grid we can see that the Email field is locked as the Job Title is blank.

Email Locked as Job Title is Blank

The field is unlocked once the job title is entered.
Email Unlocked

Step 4: Now we edit the criteria of the Business Rule and add a new condition to also check if the Description field contains data  as shown in the image below.

Business Rule 2

Step 5: When we go to the editable grid we see that even though the Job Title field is blank the Email field is unlocked which should have been locked.

Validation Fail

Step 6: The reason behind this is that the My Active Contacts view does not contain the field description hence the validation fails.

Step 7: To solve this we add the Description column to the view as shown below.

Adding Description Field

Step 8: Now if we check in the editable grid we see that the validation works correctly and the email field is locked.

Validation Success After Adding Field

Conclusion:

This is important to be noted as, if there is some validation done using business rules, JavaScript and field is not present in the views the validation wont work and there will be incorrect data entries made using the editable grid.


Share Story :

Secured By miniOrange