Options

ConfirmationDialog and CurrPage.CLOSE

alexjensenalexjensen Member Posts: 41
edited 2011-04-08 in NAV Three Tier
Hi all

I'm making some modifications to page 342 (Check Availability). To make the story short I'm trying to add code to close page 342 under certain circumstances.

To test it I put the code below in the OnLookup trigger on a new field:

CurrPage.CLOSE;

But nothing happens if I press the value on the field. If I write the code below the message dialog appears but the page is not closed.

MESSAGE('TEST');
CurrPage.CLOSE;

So is it impossible to close this type of page by code?

Thanks!

AJ

Comments

  • Options
    mark_aumark_au Member Posts: 40
    edited 2011-04-08
    I have a custom page in my R2 database, I added the line CurrPage.CLOSE to the OnLookup trigger behind one of my fields, and when I press the little arrow on the Page it will close. So it should be possible, what version/build of NAV are you using exactly? What type of page is it? etc.

    [edit] okay I could have just easily checked the Page to see what it was :P Must be something to do with the Page type being ConfirmationDialog. I changed my custom Page from a List to a ConfirmationDialog and it won't open directly from the Object Designer now :S

    I don't have any more time to play with it, but will see if I can try again next week. I'd suggest maybe seeing if there is any documentation/help on pages with type ConfirmationDialog to see if there is a reason why it won't work?
  • Options
    alexjensenalexjensen Member Posts: 41
    I'm using NAV 2009 SP1 build 31587. The page type is ConfirmationDialog (like page 342). As far as I have found out it's not possible.

    AJ
  • Options
    deV.chdeV.ch Member Posts: 543
    CurrPage.Close is not possible from every trigger, and maybe depending on page type yes. I had a support request on this because i wanted to close a page on the OnOpen Trigger (Open another page instead) the answer was it's not possible from there. So i assume there are other triggers which can't perform a close.
Sign In or Register to comment.