PAGE.RUNMODAL actions change in Dynamics NAV 2013

PAGE.RUNMODAL actions change in Dynamics NAV 2013

Rate This
  • Comments 0

In Dynamics NAV 2009 page.RUNMODAL can have actions OK, Cancel, LoookupOk, LookupCancel, Yes, No, Close, FormHelp, RunObject, RunSystem. Like it is described at http://msdn.microsoft.com/en-us/library/dd355151.aspx you can create code like:
IF Page.RUNMODAL(21, MyRecord, ...) = Action::Close THEN...;

But in Dynamics NAV 2013 actions list is changed to OK, Cancel, LookupOK, LookupCancel, Yes, No, RunObject, RunSystem (http://msdn.microsoft.com/en-us/library/dd355151(v=nav.70).aspx ).
As you see there is no action ‘Close’. Means if we have code based on this action this code will never be executed.

Action ‘Close’ can’t be used in NAV 2013 because with web client in browser we can’t catch what action user does: close page or close browser.

I'm writing this article because we can import objects from previous NAV versions and then can run it.

Before NAV 2013 build 34588 we could compile these objects but during run it’s showed errors.
With fix KB 2836619 compiler shows error here and now we need manually change to action we really want or even we need to change application workflow, because we have no real replacement for ‘Close’.

So be ready to rewrite your code.

These postings are provided "AS IS" with no warranties and confer no rights. You assume all risk for your use.

Gedas Busniauskas
Microsoft Lithuania
Microsoft Customer Service and Support (CSS) EMEA

Leave a Comment
  • Please add 4 and 7 and type the answer here:
  • Post