data inconsistency

Hi All,

I have written a validation method to validate whenever the field is modified. I have overridden the ‘ModifiedField’ method at table level and a method is called to validate the field. At the end of the customized method, a error is thrown, if the validation fails. But the case is, when invalid data is enter for field in the form, error message is thrown but the data is saved. I dont know why is it happening.

validateField(string _ValueStr)

{

initialize regular expression;

validate regular expression

if(regMatch.getsuccess())

{

do validation

}

else

{

throw error(“Invalid value”);

}

}

Following error message is displayed

0537.error.jpg

Regards,

Raghav.

Hi Raghav, In order to validate, you should write code in validate field method, doing so, it will throw error as well data will not be saved. Write your validation code directly in validate field method instead calling it from modified field method. It will work fine for sure. Regards, Kuppusamy S