06 October 2010

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.

// --- 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)
}

No comments:

Post a Comment

Give me the commetns and solutions

Ledger Voucher creation Framework and x++ code to create ledger voucher

 Please click her for MS reference file Below is the out of the box example reference and code. SalesInvoiceJournalPostSubBill_Extension->...