Showing posts with label Run Time Event. Show all posts
Showing posts with label Run Time Event. Show all posts

Sunday, February 28, 2010

Scripting alternative –Data Validation Manager

Many times, system requires us to put validations; we generally end up with scripting in Pre Events like PreSetFieldValue or PreWriteRecord.

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:- 
  1. Create a DVM Validation Message.
  2. Create a DVM Rule.
  3. Call Data Validation Manager BS using the Action Set.
  4. In the Business Service Context, Provide the DVM Rule name.
  5. Create a RTE.
  6. Reload the RTE and activate the DVM Rule.
  7. 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.

Wednesday, September 23, 2009

Business Service Context

Input Argument to Action Set of Runtime Event

I thought to write an article how to use the input argument while we invoke Runtime Event Action Set. We invoke Runtime Event to generally call a Business Service/Workflow.

When you specify the Business Service and its method there at Event. There is one more field called Business Service Context. This Business Service Context can be used to set the input Argument of the Business Service Method.

Let's say I want to invoke a workflow from that business service so my:

Business Service ## "Workflow Process Manager"

Method ## "Run Process"

Business Service Context ## "ProcessName", "WorkflowNameHere", "OtherProperty", "Value"

Sharing is the Power