How to colour code different companies inside axapta

During development and test we often switch between different companies in our installation. To not mistaken us, so we always make changes in the correct one, we made this small change in the code. With different background-colours for each company, you never delete something importent by mistake. This example shows how it could be done.

Again we use the SysSetupFormRun class, but this time we look into the Run method. Add below code between the start/end comments and restart your client. Next time you start, all forms will have the background colours you set for each specific company.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// --- START 071001 Fourone/JOJ  (EnvironmentAddOns4)
// --- Description: Display company 'xxx' with different 
//                    background color
public void run()
{
    FormDesign formDesign = this.design();
 
    super();
    if (companyinfo::find().dataAreaId=="dmo")
    {
        if (formdesign)
        {
            formDesign.colorScheme(2);
            formDesign.backgroundColor(0x00ff);
            formdesign.caption("-- dmo -- ");
        }
   }
// --- END 071001 Fourone/JOJ (EnvironmentAddOns4)
}

Last 5 posts in Development

One thought on “How to colour code different companies inside axapta

  1. Hi,

    we have used this form/.

    we have 2 aos and 1 sql server.
    After a crash of 1 aos, we have build a new aos.
    After reboot of both aos(s) the colours of the company’s are changed back to grey.

    Do you have any idea why?

Leave a Reply

Your email address will not be published. Required fields are marked *