How To Add Entity Field Validations


Field validation allows you to create custom error messages without the need to involve a BillingPlatform developer. This uses the object reference model to source data from the entity fields as well as the BillingPlatform formula language to enable you to put together your own validation rules.

When the validation rule's formula is satisfied, it will display the error message and prevent the saving of the record.


Step 1. Select the Correct Entity

Select the entity where the field will be created in by going to Setup > Develop > Entities and then select the desired entity.

Then, click the Validations child node on the left navigation pane.

Click the New button to continue. The New field wizard page is displayed.

Step 2. Complete the Form.

The heart of the form is the Validation Formula text entry field where you can add reference fields and use the BillingPlatform formula language to build the value that is needed.

The formula building buttons can be used to add fields, operators, functions, as well as validate the syntax of the entered formula. For example, if you need to prevent a user from creating/updating an Account record when they are not a member of the BRM_ADMIN user group, the following formula can be used:

{!AccountObj.AccountTypeObj.AccountType} = 'ACCOUNT' AND  {!AccountObj.CreatedUserObj.RoleObj.Name} <>  'BRM_ADMIN'

The {...} parameters are entity fields and as you can notice, as long as there is a relationship with other entities such as AccountType and User objects, the fields can be used as part of the formula parameters.

The rest of the fields can be populated as you would any other fields. Refer to the field description table below for details:

Field Description
Validation Name Enter a system name for the validation rule. This name must only contain XML valid characters.
Active Determine if the validation rule is active (ticked) or not (unticked).
Display After Select the field in which to display the error message.
Error Message Indicates the error message that will appear on the form or returned in the API when the validation rule's formula is satisfied.
Validation Order Indicates the order in which the validation rule will be validated. This will allow you to string validation rules one after the other.
Help System Complete the field to allow the help icon to display and show your help text.

Step 3. Save The Field.

Click the Submit button to save the new field.

 Related Topics

Have more questions? Submit a request


Powered by Zendesk