O'Reilly logo

Microsoft Dynamics AX 2009 Development Cookbook by Mindaugas Pocius

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Changing common form appearance

In every single multi-company Dynamics AX project, in order to prevent user mistakes, I was asked to add functionality that allows setting the background color of every form per company. By doing that, users clearly see in which company account they are at the moment and can easily work within multiple companies at the same time.

In this recipe, we will modify SysSetupFormRun class to change the background color for every form in Dynamics AX.

How to do it...

  1. Open SysSetupFormRun in AOT, and override its run() with the following code:
    public void run()
    
    {;
    super();
    this.design().colorScheme(FormColorScheme::RGB);
    this.design().backgroundColor(WinAPI::RGB2int(255,0,0));
    }
    
  2. To test the results, open any Dynamics AX form, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required