Quantcast
Channel: Microsoft Dynamics AX Forum - Recent Threads
Viewing all articles
Browse latest Browse all 175888

AIF Warnings

$
0
0

Hi,

Is there any way to transfer warning messages to the consumer of the service operation without throwing an exception. AifFault class has a static method (logWarning), but this method just put a warning message to the AX infolog. AifFault class also has a method (InfologMessageList), where the infolog messages are stored, but this list is populated only when the exception has  been thrown. For Example: throw AifFault::fault(...);

try
{
   // here we perform a service operation call via proxy service class
}catch (FaultException<AifFault> ex)
{
    foreach var exceptionLog in ex.Detail.InfoLogMessageList)
    {
        exceptionLog.InfologMessageType -> is the type of message (Info, Warning..)
        exceptionLog.Message -> is the message
    }
}

I would like to transfer warning message to the consumer of the web service operation, but not exception. Is it possible to do that? And if yes, how?

Thanks!

Regards,


Viewing all articles
Browse latest Browse all 175888

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>