Customizations without changing Menusuite or default code (UPDATE)

In my previous post I explained how easy it is to do modifications without changing the Menusuite or default code. When implementing this idea in a previous NAV version I experience a strange behavior. Every time I try to print a report I got stuck in an endless loop. The report is printed or print previewed but the request page comes back. Very annoying.

So I investigate this behavior and found that the CAL syntax CurrReport.QUIT doesn’t work as expected in the InitReport Session. As I supposed the report must QUIT executing after this line of code, but for some strange reason it won’t.

To make my idea work I came up with the following alternative.

Instead of using the CurrReport.QUIT I raise an empty error so that the report will stop executing. The will end up with the expected behavior for my idea in a pre NAV2015 version.

But it also works in NAV2015.

For your interest you can also use this in objects like:

  • Page: OnInit
  • XMLPort: OnInitXMLPort

Leave a Reply

Your email address will not be published. Required fields are marked *