After having implemented the field level validation in ADF in this link, in this article you will learn how to implement record level validations. For the performance reasons, the record level validations must be preferred over the field level validations. Similar to attribute/field level validations, these record level validations can be configured within the Business Rules section of the entity object.
Sometimes during the validation, you have a need to execute a SQL statement. For example, in the Receivables Invoice entity object might want to execute a SQL statement to check if the customer site is still active. Of course, the customer site table itself might have an entity object that can be used for validation, but that entity object will have all the columns in the table. For the purpose of our example, the SQL issued for validation should be very simple such as “select ‘x’ from hz_cust_site_accounts where status = ‘A’ and cust_site_account_id = :1. For these kind of validations VVO’s [ validation view objects ] can be created. These VVO’s can then be attached to the Entity Object in the business rules section. Please note that VVO’s do not have to be attached to the application module, because Application Module does not manage the state of these objects, nor are the results of these VVO’s cached in the middle tier.
The video below explains the steps for implementing the record level validations in ADF Fusion Apps, by leveraging VVOs.
Note that in 11i / R12, this was very clunky, because you had to register Validation Application Module and Entity Expert Class and then configure the EO to call the VVO via entity expert.
Now in ADF, this process has been simplified, as shown in the example of this video
Use HD Option to view the video
The video can be accessed from here
http://youtu.be/G7hcUdtttJA
Comments
Evaluating your past is the best learning you can do. There's no better lesson than failures you did in the past. ?
RSS feed for comments to this post