Logo
programming4us
programming4us
programming4us
programming4us
Home
programming4us
XP
programming4us
Windows Vista
programming4us
Windows 7
programming4us
Windows Azure
programming4us
Windows Server
programming4us
Windows Phone
 
Windows Server

Microsoft Dynamics AX 2009 : Working with Data in Forms - Coloring records

- Free product key for windows 10
- Free Product Key for Microsoft office 365
- Malwarebytes Premium 3.7.1 Serial Keys (LifeTime) 2019
8/26/2012 5:38:38 PM
The possibility to color individual records is one Dynamics AX feature that can improve user experience. Normally, people like to see a reasonable number of colors in the interface they use. This makes their daily tasks not so boring.

One of the common requests is to emphasize the importance of disabled records, for example, terminated employees or stopped customers by displaying their records in a different color, normally red. An opposite example could be to show processed records like posted journals or invoices sales orders, let's say in green.

In this recipe, we will color locked-in-journal accounts in the Chart of accounts form.

How to do it...

  1. 1. In AOT, open the LedgerTableListPage form and override the displayOption() method in its LedgerTable data source with the following code:

    public void displayOption(
    Common _record,
    FormRowDisplayOption _options)
    
    {;
    if (_record.(fieldnum(LedgerTable,BlockedInJournal)))
    {
    _options.backColor(WinAPI::RGB2int(255,100,100));
    }
    super(_record, _options);
    }
    
  2. 2. To test the coloring, open General ledger | Places | Chart of Accounts and notice how locked-in-journal accounts are displayed now in a different color:

How it works...

The method displayOption() on any form's data source can be used to change some of the visual options. Every time, before displaying the record, this method is called by the system with two arguments; the first is the current record and the second is a FormRowDisplayOption object, whose properties can be used to change record visual settings. In this example, we check if current ledger account record is locked in journal and if yes, we change the background property to light red by calling backColor().

Other -----------------
- SQL Server 2008 : Data Collector and MDW - Custom collection sets
- SQL Server 2008 : Physical server design - Server consolidation and virtualization
- Windows Server 2008 Server Core : Determining File and Directory Status with the ChkDsk Utility, Performing Boot Time Disk Checks with the ChkNTFS Utility
- Windows Server 2008 Server Core : Changing File and Directory Attributes with the Attrib Utility
- SQL Server 2008 R2 : Creating and Managing Databases - Creating Databases
- SQL Server 2008 R2 : Creating and Managing Databases - Database Files
- InfoPath with Microsoft Content Management Server Web Services : Creating the InfoPath Document
- InfoPath with Microsoft Content Management Server Web Services : Creating the ASP.NET Web Service
- Active Directory Domain Services 2008 : Configuring Attributes to Be Indexed for Containerized Searches, Configuring Attributes Not to Be Indexed for Containerized Searches
- Active Directory Domain Services 2008 : Configure Attributes to Be Copied When Duplicating Users, Configure Attributes Not to Be Copied When Duplicating Users
 
 
Top 10
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 2) - Wireframes,Legends
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 1) - Swimlanes
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Formatting and sizing lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Adding shapes to lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Sizing containers
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 3) - The Other Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 2) - The Data Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 1) - The Format Properties of a Control
- Microsoft Access 2010 : Form Properties and Why Should You Use Them - Working with the Properties Window
- Microsoft Visio 2013 : Using the Organization Chart Wizard with new data
 
programming4us
Windows Vista
programming4us
Windows 7
programming4us
Windows Azure
programming4us
Windows Server