Implementing Data Consistency Check
Hi,
In this post, we will see the basic setup and customization to implement the database consistency check feature.
Below are the steps:
Step 1: Creating setup data:
- Created a new table by name SampleTable which has the fields like Id(primary key), Name, DueDate and loaded with some data.SampleTable
-
Created a new table by name SampleTrans that has fields RefId(foreign key), Description, TransId(primary key), Amount, DueDate and loaded with some data. Here RefId is the Id field from SampleTable and SampleTrans acts as child table. SampleTrans
Step 2: Develop consistency check class:
- We will develop a custom consistency check class (say) CGConsistencyCheck that extends SysConsistencyCheck class and include our tables SampleTable and SampleTrans. CGConsistencyCheck has the following methods.
class CGConsistencyCheck extends SysConsistencyCheck
- Method - description
- Method - helpText
- Method - executionOrder. Number 55 was chosen such that our class appears next to Vendors on the form UI.
- Method: main
-
Method: run
Step 3: Executing Consistency Check:
- Navigate to the form Consistency check(Path: System Administration > Periodic tasks > Database > Consistency check) and select the node Custom(under Vendor node). Consistency checks form
-
Click on OK button to see the Output
-
Output signifies there are no errors since there are no data issues and we did not include any validations. In my next post we will see how we can implement them.
Regards,
Chaitanya Golla

Like
Report
*This post is locked for comments