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?
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.
Comments
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:
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