Wednesday, 18 November 2015

Change background color in Microsoft Dynamics AX

Hi guys,


Today I am discussing about very interesting/colourful topic. Generally we face the requirement to change the backgroud color of AX forms. Hence, user can differentiate between companies.
This is very simple you have to overwrite Run method into the "SysSetupFormRun" class and bellow code for changing background AX

Class - "SysSetupFormRun"
> Over
public void run()
{
;
super();
switch(curext)
{
case "AYN":
        this.design().colorScheme(FormColorScheme::RGB);
        this.design().backgroundColor(WinAPI::RGB2int( 204,255,0));
        break;
case "CAT":
        this.design().colorScheme(FormColorScheme::RGB);
        this.design().backgroundColor(WinAPI::RGB2int (155,255,0));
        break;
}
}

You can provide your color: in RGB format :-)


Happy DAXing :-)




2 comments:

  1. Good and Useful Suggestion Atul.

    ReplyDelete
  2. Hello! It's wonderful that I found this colourful topic, it was very helpful to me. I just wanted to change he background colour of AX forms, but had no idea how to do it. After reading your tutorial, I successfully changed colours, so everything works! Thank you for sharing this useful feature :)

    ReplyDelete

Import General journal from excel in D365 F&O

 Hi Guys, Import General journal from excel in D365 F&O Code:  using System.IO; using OfficeOpenXml; using OfficeOpenXml.ExcelPackage; u...