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 :
Finance | Project Operations, Human Resources, ...
Suggested Answer

Show color on Grid data

(2) ShareShare
ReportReport
Posted on by 478
Hello,
I have the below code in my form datasource, and all it does is only makes my record bold and does not show color at all. Any ideas
public void displayOption(Common _record, FormRowDisplayOption _options)
{
    ProdOrderTmp    ProdOrderTmp = _record;

    if (ProdOrderTmp.AttbResult == PassFail::Pass)
    {
        _options.fontBold(true);
        _options.backColor(606);
        _options.textColor(WinAPI::RGB2int(144, 238, 144));
    }    
    
    super(_record, _options);
}
 
Categories:
I have the same question (0)
  • Martin Dráb Profile Picture
    239,381 Most Valuable Professional on at
    Which version of AX are you using?
  • Suggested answer
    Subramani Sivan Profile Picture
    236 on at
     
    Hi @SKO

    Please try the below code in your form datasource.
     
    public void displayOption(Common _record, FormRowDisplayOption _options)
    {
        ProdOrderTmp    ProdOrderTmp = _record;
    
        if (ProdOrderTmp.AttbResult == PassFail::Pass)
        {      
              _options.backColor(WinAPI::RGB2int(255,255,0))
            
        }    
        
        super(_record, _options);
    }
     
    Thanks,
    Subra

    If this helped, please mark it as "Verified" for others facing the same issue
  • SKO Profile Picture
    478 on at
    I am using latest version of D365FO. 10.0.46 (10.0.2428.114)
  • Martin Dráb Profile Picture
    239,381 Most Valuable Professional on at
    I changed the category from Microsoft Dynamics AX to Dynamics 365 Finance, to match the product you have in mind.
     
    Your code works find if I use it in my own form, therefore your problem lies somewhere else than in this piece of code.
     
     

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 > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Giorgio Bonacorsi Profile Picture

Giorgio Bonacorsi 694

#2
André Arnaud de Calavon Profile Picture

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

#3
CP04-islander Profile Picture

CP04-islander 337

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans