Kbase 19013: ADM2 - How To Validate An Entire RowObject At Once?
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  12/17/2004 |
|
Status: Verified
GOAL:
If you need to do complex data validation across multiple fields in a SmartDataObject (SDO) at once, you can create an internal procedure in the SDO called RowObjectValidate within which you can do the validation.
GOAL:
How To Validate An Entire RowObject At Once?
FACT(s) (Environment):
Progress 9.x
FIX:
The RowObjectValidate internal procedure is called from submitRow and has all of the fields in the RowObject populated with their correct values.
For example, the following code (when placed in the RowObjectValidate internal procedure) cancels any data change (add or update) where the SalesRep is "SLS" and the Balance or CreditLimit fields are out of a range (this is a new salesrep):
IF RowObject.SalesRep = "SLS" THEN
IF RowObject.Balance > 0 OR RowObject.CreditLimit > 5000 THEN
RETURN "SalesRep Not Authorized For This Change".