Comments & OnLookup

Belias
Member Posts: 2,998
i just noticed that even if there are only comments in the onlookup trigger of a field in a table, the table relation used to look up the table (for example) won't be considered when looking up that field. In other words, in order to not use the onlookup trigger, it is not sufficient to comment out your code, you MUST delete it :shock:
0
Comments
-
Yep, the problem with this is, in three months time you forget about this and again, you spend 1 hour finding this out again. for example: try a lookup directly in a table view0
-
a BLANK line is enought to say the System: "Use the lookup trigger". So the trigger should be empty if you won't use itDo you make it right, it works too!0
-
Belias wrote:fortunately, it never happened to me in 2y of developing...i noticed this while messing with pages and the new lookups...
I think this was the first "bug" I reported to PC&C with the new Windows product. After waiting weeks for a reply, the response was "please read the manuals" and yes it does actually state that any code in the trigger will replace the default functionality. So this is a feature, not a bug.
Since then I read the manuals a lot closer and more literally.David Singleton0 -
So this is a feature, not a bug
this sounds familiar...
anyway, i can't understand any good reason to make valid blank and commented lines of code...but i can't see the big picture of "god microsoft" :roll:0 -
The logc was that the program simply looks to see if the trigger is blank, and if blank does its thing. Even a commented line generates something, so that is the trigger to say "Don't perform the default action." Its crazy, but logical in a Danish sort of way.David Singleton0
-
-
Belias wrote:but i can't see the big picture of "god microsoft" :roll:0
-
I think this was the first "bug" I reported to PC&C with the new Windows product.
that was also my first "bug" report. Long long time ago .....
Do you make it right, it works too!0 -
damn it! the same happens for OnFindRecord Trigger...but the behaviour is more weird here...nav opens the page but does not show any record...i guess that a line of commented code overwrites the standard behavior (as onlookup trigger does), but the "which" parameter is still blank...
i just wasted nearly an hour #-o0 -
#-otry a lookup directly in a table view
Just spent about an hour to solve the mystery.
Thank you for mentioning this!0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K 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
- 320 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