Using the Infolog [AX 2012]
Updated: January 19, 2012
Applies To: Microsoft Dynamics AX 2012 R2, Microsoft Dynamics AX 2012 Feature Pack, Microsoft Dynamics AX 2012
As you add code to User Controls, you may have situations that require communicating important information to the user. Do this by sending a message to the Infolog that is displayed on the page. The Infolog is a separate web part on the page. It is automatically included on new pages that you create for Enterprise Portal.
The Infolog is accessed through the .NET Business Connector proxy for Enterprise Portal. To access the .NET Business Connector proxy, you must add the following reference to your code so the items in the proxy can be accessed.
You must create an instance of the Info object to be able to work with the Infolog. This is shown in the following example.
Several message types can be written to the Infolog. The Exception enumeration defined in the Enterprise Portal proxy defines the various types. The most common message types are listed in the following table.
To add a message to the Infolog, use the add() method for the Info object. The following example adds a warning message to the Infolog.
When you add a message to the Infolog, any messages that are currently displayed will remain. This allows for the Infolog to display multiple messages at the same time. To clear the Infolog of any messages that have been added to it, use the clear() method for the Info object. The following example clears the Infolog.