OnValidate trigger

This is something that I came across and wanted to share with others. If we include code in the OnLookup trigger of a field in a table, it turns off the OnValidate trigger, which means we need to explicitly VALIDATE the field in the OnLookup trigger otherwise, if user looksup and selects a value from list the field does not get validated. However, if user types a value for the field the OnValidate trigger fires when user leaves the field. Pari Somasundaram

The same happens with the OnLookUp trigger in a form. When you put some comment overthere, the OnLookUptrigger in the table will not be executed. You’ll just have to learn to live with it … Anolis Sittard Netherlands

Yeah, But watch out for using validation in the Onlookup trigger in tablefields. They are also executed when looking up in reports etc. Regards.

quote:


Originally posted by paris: This is something that I came across and wanted to share with others. If we include code in the OnLookup trigger of a field in a table, it turns off the OnValidate trigger, which means we need to explicitly VALIDATE the field in the OnLookup trigger otherwise, if user looksup and selects a value from list the field does not get validated. However, if user types a value for the field the OnValidate trigger fires when user leaves the field. Pari Somasundaram


Why would you require the validation on the lookup, by definition only valid entries can be selected on the lookup. David Mavis

BUT, this is fixed in Navision Attain. Hoooray, it only took from 94 till 01 :wink: Lars Strøm Valsted Head of Project and Analysis Columbus IT Partner A/S www.columbusitpartner.com

quote:


Lars Strøm Valsted wrote: BUT, this is fixed in Navision Attain. Hoooray, it only took from 94 till 01 :wink:


So if we update a database to Navision Attain we’ve to take care of all the code we used for “fixing” that problem in our fields and all the code that “exploited” that bug by having an “uncompatible” with the lookup one validate function… Regards, Alfonso Pertierra (Spain)apertierra@teleline.es