onQuit Event

mickukmickuk Member Posts: 47
Hi Mibusonians,

Im trying to trap the quit event from a user pressing cancel on a progress dialog. There does not seem to be an event that handles this. Has anyone manged to achive this?

Thanks in advance

Comments

  • WaldoWaldo Member Posts: 3,412
    Sorry man, I think this is a 'no-go'... .
    As far as I know, this triggers an ERROR('') internally ... rolling back all transactions without an error message.

    May be one tip:
    Program your functionality into a codeunit OnRun. Then call this codeunit like:
    IF NOT CODEUNIT.RUN(CODEUNIT::"YourCU",recYourRec) THEN BEGIN
      //*** possibly the "cancel" button was pressed
    END;
    

    With GETLASTERRORTEXT you might be able to figure out what happened. (may it's empty when you pressed cancel?). You'll have to figure this one out.

    Just an idea :|

    Eric Wauters
    MVP - Microsoft Dynamics NAV
    My blog
Sign In or Register to comment.