Recently, I worked on Data Validation Manager which is a quite useful tool to do validations in the application itself without changing the srf. With the combination of Run Time Events, I really found DVM competitive to avoid scripting and from maintenance perspective also.
We can use conditional expression to check the validation and invoke a RTE and DVM.
I will run through the End to End process of creating a RTE and DVM Rule. I will also show you validation getting fired in the application.
Let’s take an example, I want to put a validation that a contact record must have an email address or a Mobile Phone number or a Work Phone number.
To work this validation out, I will do the following steps:-
- Create a DVM Validation Message.
- Create a DVM Rule.
- Call Data Validation Manager BS using the Action Set.
- In the Business Service Context, Provide the DVM Rule name.
- Create a RTE.
- Reload the RTE and activate the DVM Rule.
- Creating a new Contact Record and test the DVM.
I need to create RTE and DVM. It will be a mandatory check for email address or a Mobile Phone number or a Work Phone number. This RTE will be on PreWriteRecord of Contact BC.
Step1: Go to Administration - Data Validation and Create the DVM Message
Step 2: Create DVM Rule for contact validation.
Step 3 and Step 4: Create an Action Set for RTE
Business Service: Data Validation Manager
Business Service Method: Validate
Business Service Context: "Rule Set Name", "Contact Details", "Enable Log", "Y".
Step 5: Create a Run Time Event on PreWriteRecord on Contact BusComp and Call the Action Set created in Step 3 and 4.
Step 6: Reload Run Time Event and Activate DVM Rule.
Step 7: Create a Contact Record and test DVM.
The Limitation of the DVM is that field should be visible on the UI.
Sharing is the Power.