OnValidate trigger form/table behavior
ben5000
Member Posts: 110
Hi all,
I've some code in the OnValidate trigger of a form which is not executed when I'm using the form to input data.
I suspect this is because the OnValidate trigger on Table level contains some code too.
Can you confirm this behavior? Is there a way to execute the code in the OnValidate trigger (on the form) after the code of the table is executed?
I would like to avoid copying the code of the form in the table because it displays some error messages...
Thanks a lot
I've some code in the OnValidate trigger of a form which is not executed when I'm using the form to input data.
I suspect this is because the OnValidate trigger on Table level contains some code too.
Can you confirm this behavior? Is there a way to execute the code in the OnValidate trigger (on the form) after the code of the table is executed?
I would like to avoid copying the code of the form in the table because it displays some error messages...
Thanks a lot
0
Answers
-
As per me, first the Table onValidate trigger will be executed and then Form OnValidate trigger..
Just try by putting some messages in table and form onvalidate and try0 -
After this test it seems that only the table trigger is executed

Maybe a property can change this behavior?0 -
I have not set any property..
Just added a field in Purchase Header Table and displayed on Form..
added messages in table field Onvalidate and Form field Onvalidate..
First got table message and then form..
comment the existing code and try..
Can you show us the code on Onvalidate triggers of table and form?0 -
I'm running Nav 5.00 maybe it's the reason? Are you using Nav 2009?0
-
Yes..6.0SP1..0
-
Issue solved: there was some code in the OnLookup trigger which caused the field to be implicitly not validated.0
-
I don't think so.ben5000 wrote:I'm running Nav 5.00 maybe it's the reason?
Back to the basic, what error you get? And what do you want to achieve? This simple general question maybe so basic, and hopefully could lead you to the real solution.ben5000 wrote:I would like to avoid copying the code of the form in the table because it displays some error messages...
Regards,
Andwian0 -
All validation code should be on a table level. You should NEVER have ANY data validation code on the form.
Don't "copy" the code to the table, "move" the code to the table. Use CurrFieldNo to determine whether the validation happens on a form. Use GUIALLOWED for default behavior in NAS.0 -
Many thanks four your answers:)0
-
I have same problem
on Service Order Assigned UserID OnValidate() I have some code. I need this code to effect when the value is changing from integrated application. This code is effecting only with manual interaction. I hope that is clear, please help
Thank YouPleasure in the job puts perfection in the work0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.7K Microsoft Dynamics NAV
- 18.8K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 328 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions


