Skip to main content

Notifications

Community site session details

Community site session details

Session Id :

X++ code to customize the displayed warning message in D365FO

Chaitanya Golla Profile Picture Chaitanya Golla 17,225

Hi,

In this post we will the code to add custom information to the info message using X code in D365FO.

class DAX_ModifyInfoMessage
{        
    /// 
    /// Runs the class with the specified arguments.
    /// 
    /// The specified arguments.
    public static void main(Args _args)
    {    
        SysInfologEnumerator	infologEnumerator;

		info("Info message");
	
        infologEnumerator = SysInfologEnumerator::newData(infolog.infologData());

        if (infologEnumerator.moveNext())
        {
            str displayInfo = "Modified"   infologEnumerator.currentMessage();
            Message::Add(MessageSeverity::Informational, displayInfo);
        }
		    
    }

}

On executing the above button, we get the below output:

7318.Output.jpg

Regards,

Chaitanya Golla

Comments

*This post is locked for comments