NAV 2013 R2 Pages - Ok Cancel Button

Hi All,

I have page of type Card and have added a Action Page - List type(Say Comment List) and given relation by setting property RunPageLink.

My concern is that In Comment List Page when i press OK button i want to call function and on Esc the page just close without executing the function.

i have tried in below trigger but did not work out.

OnQueryClosePage(CloseAction : Action None) : Boolean

IF CloseAction IN [ACTION::OK] THEN BEGIN

myfunction;

MESSAGE(’%1’,CloseAction );

END;

On Press OK or Esc the page i am getting OK in the message.

can anyone advise me?

Thanks for your time.

which nav version is that?

is the comment list a factbox in a page, a subpage or the page itself?

ok, first question is clear. nav2013 r2.

Its a Page added in Page Actions.

Thanks!

it’s not possible to catch the Esc key. the closeaction returns always Ok.

add a confirm dialog to the onqueryclosepage. you get a “close?” yes/no dialog. with the result you can call your function or not.

Thanks! seems to be only the way you have suggested for this issue.