web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

trans color

(0) ShareShare
ReportReport
Posted on by

dear  ;

i have table name   DAPEMPLTRANS   need when trans in posted coming by color  

i am add the code in DAPEMPLTRANS   table

but not work can any help for this

This code :

public void displayOption(Common _record, FormRowDisplayOption _options)
{
    DAPEmplTrans     daptrans;

    DAPTrans = _record ;


    
   Switch(DAPTrans.Posted)
    {
        Case NoYes::Yes:
        _options.backColor(8421631); //Light Red 8421631
        Break;
    }

    Switch(DAPTrans.Posted)
    {
        Case NoYes::No:
        _options.backColor(65408); //Light Red 65408
        Break;
    }

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Rustem Galiamov Profile Picture
    8,072 on at

    Hi!

    Do you add the code on form datasource table?

    Your switch/case statement should look like:

    switch (daptrans.posted)

    {

    case NoYes::Yes:

    _option.backColor(8421631);

    break;

    case NoYes::No:

    _option.backColor(65408);

    break;

    }

    And finally - try to debug the code and be sure you have daptrans record cursor.

  • Community Member Profile Picture
    on at

    dear Rustem Galiamov ;

    I am add the code in data source table  how can i add it is dapempllistpage form

    thanks

  • Suggested answer
    Rustem Galiamov Profile Picture
    8,072 on at

    It is not possible with the list page as you cannot override the displayOption method on the query data source used to show data on list page grid, neither this can be done in the ListPageInteraction class.

    You can use an alternative to fulfill your requirement, in which you can set an indicator on the first column of the grid of the list page.

    This indicator can be the colorful small icon images. Which can be returned by display method of that particular table based on the conditions.

    Screen-Shot-2018_2D00_08_2D00_29-at-00.00.48.png

  • Mea_ Profile Picture
    60,286 on at

    2 years ago you thought that it is possible community.dynamics.com/.../87678

  • Rustem Galiamov Profile Picture
    8,072 on at

    Yes, but this is a cheat and not stable solution.

  • Mea_ Profile Picture
    60,286 on at

    It was good enough 2 years ago to suggest it as an answer, so what has changed?

  • Rustem Galiamov Profile Picture
    8,072 on at

    Nothing, and i mentioned that the solution not stable:

    4. BTW it's work until you don't touching the form in development mode. If you're change or open the form from AOT - AX remove all the methods. If it's happens - run job again...

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
CP04-islander Profile Picture

CP04-islander 26

#2
imran ul haq Profile Picture

imran ul haq 8

#3
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 4 Super User 2026 Season 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans