Question

I'm new in AX and want to know how to display custom error message or warning. I have looked for the solution and found out following in an msdn link;

You can optionally display a custom error message in a dialog of the Web application by having your plug-in throw an InvalidPluginExecutionException exception with the custom message as the Message property value.

But I have no idea how to use it.

can this link be helpful in achieving this task?

Was it helpful?

Solution

Warning and error messages in AX are handled by the Infolog system. From X++, you use the info, warning, or error methods to add a message to the Infolog. Typically, you would throw the return value from those methods to also generate an exception:

throw error("My error message.");

On Enterprise Portal pages, most pages will have an Infolog webpart. You can add messages to the Infolog using the Info object from the .NET Business Connector proxy. See the topic Using the Infolog in MSDN.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top