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

Picking a color

In this recipe, we will be creating a color lookup. As an example, we will create the possibility to choose a color in the Company information form, which might be used to define different colors for each Dynamics AX company. That's one of my favorites and is very useful in Dynamics AX multi-company installations. Normally, I use additional code, which reads the user setting and changes the background color of all forms in the same company. This allows users to easily identify in which company they are and prevents incorrect postings.

How to do it...

  1. Open the CompanyInfo table in AOT, and create a new field with properties:

    Property

    Value

    Type

    Integer

    Name

    CompanyColor

    ExtendedDataType

    CCColor

  2. Open the CompanyInfo form in ...

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