Running on old code?

MortenSteengaard
Member Posts: 144
This question is concerning NAV 2009.
I have a form that calls a "Processing Only" report. The report calls a codeunit.
My customer has reported an error. I can reproduce the error again and again by pressing a button in the form.
If I add messages in the codeunit, I can still reproduce the error, but I don't get the messages.
If I add messages in the report, I get the messages from the report and the messages from the codeunit, but I cannot reproduce the error.
Am I running on old code in the report until I add messages in it?
Is there a difference between F11 (Compile) in the Object Designer without opening the object, and when I add a message and save and compile the report?
(My customer and a former colleague has told, that my customer now and then has to press F11 in the Object Designer in order to make this part of NAV work. Until now I haven't heard why this should be necessary.)
I hope someone can help me. I'm quite new to NAV.
I have a form that calls a "Processing Only" report. The report calls a codeunit.
My customer has reported an error. I can reproduce the error again and again by pressing a button in the form.
If I add messages in the codeunit, I can still reproduce the error, but I don't get the messages.
If I add messages in the report, I get the messages from the report and the messages from the codeunit, but I cannot reproduce the error.
Am I running on old code in the report until I add messages in it?
Is there a difference between F11 (Compile) in the Object Designer without opening the object, and when I add a message and save and compile the report?
(My customer and a former colleague has told, that my customer now and then has to press F11 in the Object Designer in order to make this part of NAV work. Until now I haven't heard why this should be necessary.)
I hope someone can help me. I'm quite new to NAV.
0
Best Answer
-
Hi everybody.
Thank you very much for your reply!
Now I have learned that the report didn't change behaviour because it ran on old code and later on on new code. The problem was that the same report was used with a user-made filter running on many objects, and the report was also used on a single object in another form. The problem was that when I first run on many objects with a specific filter, that filter is saved and used when I run the same report from the form with the single object. And then it acts very weird.
And when I then compile the report, NAV deletes the old user-made filter on that report. And that makes the report change behaviour, so it works correct on the form with only one object.
Once again, thank you very much!0
Answers
-
what is the error?0
-
The error comes before the messages?0
-
The error is not important. It is some business logic, that give some fields in the database the wrong values. The error is not an error message. The problem is that when I add messages, it seems to me that I suddenly run on different code.
I can do this:
- Restore the database from the customer on our own server.
- Reproduce the error, so some fields get the wrong values.
That is fine, but then I have to add messages to understand the code.
So I do this:
- Restore the database from the customer on our own server.
- Change license file temporarily so I have developer rights.
- Add one message in the report.
- Save and compile the report.
- Open a new NAV.
Then my message is shown, but I cannot reproduce the error.
It seems to me that before I add my message, NAV is running on an old version of the report and the codeunit. And just because I add my message somewhere in the report, NAV is running on the new version.0 -
Hi everybody.
Thank you very much for your reply!
Now I have learned that the report didn't change behaviour because it ran on old code and later on on new code. The problem was that the same report was used with a user-made filter running on many objects, and the report was also used on a single object in another form. The problem was that when I first run on many objects with a specific filter, that filter is saved and used when I run the same report from the form with the single object. And then it acts very weird.
And when I then compile the report, NAV deletes the old user-made filter on that report. And that makes the report change behaviour, so it works correct on the form with only one object.
Once again, thank you very much!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