# OnValidate trigger

**URL:** <https://www.dynamicsuser.net/t/onvalidate-trigger/5414>\
**Category:** Developers Forum\
**Created:** [October 19, 2001, 3:53pm UTC](https://www.dynamicsuser.net/t/onvalidate-trigger/5414 "2001-10-19T15:53:59Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![paris](https://avatars.discourse-cdn.com/v4/letter/p/b9e5f3/32.png) [@paris](https://www.dynamicsuser.net/u/paris)\
**Post date:** [October 19, 2001, 3:53pm UTC](https://www.dynamicsuser.net/t/onvalidate-trigger/5414/1 "2001-10-19T15:53:59Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Anolis](https://avatars.discourse-cdn.com/v4/letter/a/f6c823/32.png) [@Anolis](https://www.dynamicsuser.net/u/Anolis)\
**Post date:** [October 19, 2001, 4:05pm UTC](https://www.dynamicsuser.net/t/onvalidate-trigger/5414/2 "2001-10-19T16:05:07Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Overeem](https://avatars.discourse-cdn.com/v4/letter/o/97f17d/32.png) [@Overeem](https://www.dynamicsuser.net/u/Overeem)\
**Post date:** [October 19, 2001, 10:29pm UTC](https://www.dynamicsuser.net/t/onvalidate-trigger/5414/3 "2001-10-19T22:29:55Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![themave](https://avatars.discourse-cdn.com/v4/letter/t/f14d63/32.png) [@themave](https://www.dynamicsuser.net/u/themave)\
**Post date:** [October 19, 2001, 10:58pm UTC](https://www.dynamicsuser.net/t/onvalidate-trigger/5414/4 "2001-10-19T22:58:44Z")

</div>

> 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

---

<div class="post-metadata">

**Author:** ![lstroem](https://avatars.discourse-cdn.com/v4/letter/l/58f4c7/32.png) [@lstroem](https://www.dynamicsuser.net/u/lstroem)\
**Post date:** [October 20, 2001, 8:02am UTC](https://www.dynamicsuser.net/t/onvalidate-trigger/5414/5 "2001-10-20T08:02:33Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![apertierra](https://avatars.discourse-cdn.com/v4/letter/a/bcef8e/32.png) [@apertierra](https://www.dynamicsuser.net/u/apertierra)\
**Post date:** [October 24, 2001, 4:59pm UTC](https://www.dynamicsuser.net/t/onvalidate-trigger/5414/6 "2001-10-24T16:59:34Z")

</div>

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

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
