I have a aif service in ax 2012. I pass information into it from .net applications. basically i'm posting to the general journal. But when there is an error, say bad information being passed in, it returns a general error usually "error validating record". But the warning message displays the actual reason why it caused an error such as the bad data.
Is there a way to catch and display the warning message. I tried exception::warning
but it just goes right to the exception::error
.
catch (Exception::Error)
{
throw Global::error("need to get warning");
}
I hope to understok the question.
If you ant get all Warning message from Infolog, I have a little solution. You can take all Infolog created by system, look like :
InfologData msg;
catch (Exception::Error)
{
msg = infolog.infologData();
infolog.import(msg); // HERE show all infolog - with INFO - Warning - Errors
throw Global::error("Process Error");
}
It's not exactly request, but with this way can find all InfoLog displayed and warning too.
Good Work.
References : Infolog-INFO - Infolog2String
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With