DVM on drilldown

Recently we encountered a scenario which involved certain validations on drilldown. The go to solution was to invoke DVM on drilldown method. Lets consider a basic example of SR list applet where we need to perform certain validations when user clicks on SR-Number. Following steps are required to achieve desirable.

1 - Create a DVM rule set with name "Test Orchestration". Add desired rules as per validation requirement.

2 - Create User Property on the SR business component with following values:

Name: Named Method 1
Value:"SRDrill", "INVOKESVC", "Service Request", "Data Validation Manager", "Validate", "'Rule Set Name'", "'Test Orchestration'", "'Enable Log'", "'Y'", "'Object Id'", "[Id]"

3 - Navigate to SR list applet and edit server side script. Add following code in PreInvokeMethod event :
if (MethodName == "Drilldown")
this.BusComp().InvokeMethod("SRDrill");

The key here is if any of the validation fails execution will stop and drilldown will not happen. Data Validation Manager business service returns true/false based on whether validations are passed successfully or not.

תגובות

פוסטים פופולריים מהבלוג הזה

Profile Attributes and Open UI

SBL-BPR-00191: The rowId of the active row of the primary buscomp '%1', '%2', does not match the Primary Id

SBL-SVC-00150