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
- No valid document identified from the entity key - April 9th, 2010
- Using Regular Expressions in Dynamics AX - October 2nd, 2009
- Create class and methods in x++ - December 22nd, 2008
- Simple field lookup in form - October 13th, 2008
- Get your Intercompany CustAccount - September 29th, 2008
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?