Get rid of info/error message form

Hi All!

Does anybody have an idea how we can hack Info class to send message to the active form instead of creating a pop-up info window?

It seem that Info doesnt know who the Caller was. :frowning: The idea would be to add the info or error message runtime to the form while info wont popup, this way users dont need to click OK button on the info form all the time. It should be global for AX, not only for a certain case.

Thanks for any idea!

I can give you an idea for the smallest part of this problem:

  • Yes, you can permanently disable all info windows coming up in User Options General → Infolog → Detail level.

There is one thing you didn’t think about:

  • Not all exceptions/errors appear on UI level object (forms, for example), some may appear deep into classes hierarchy by calling, for example, 8th class in a row after several table validation methods… how do you expect to trace the caller from this level back to the form were user originally did something wrong ?

You can get a stack trace in run time (xSession::xppCallStack() - returns container with all objects and methods called) and try to track the first form which appears in stack trace and assume that this is the one to which you should pass the error message. But still it may not be an AOT form, it may also be a dialog created from class, dynamically created forms etc…

There is one more hope to play around with WinApi DLL from X++ code and try to get the active window within AX and call the method on that form which accepts the error message text and displays it on a form.

Gosh, I wish you the best of luck ,but to me it doesn’t seem like something that you can use for whole AX system.

But still, you can create some local solution for frequently used forms and try to catch all the possible exceptions and send them to your active form before Info exceptions is raised.