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.
0
Answers
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.
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!