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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Answered

Row Selection and Color Visibility in D365 FinOps Form

(4) ShareShare
ReportReport
Posted on by 33

I have created a form in D365 Finance and Operations with a data source from SalesTable and CustInvoiceJour. On the form, there's a column where the background color and text color of the Sales ID should change based on the days overdue. Everything is working fine, but when I open the form, the first row is always selected by default. As a result, the background color and text color of the Sales ID in that row are not visible.

Additionally, if I select any row, cell color doesn't clear. I want to ensure that no row is selected by default when the form opens, and that the color of every field is visible properly, regardless of the row selection. 

I have attached a screenshot for reference.

Any help or suggestions from the community would be greatly appreciated. Thanks

 

 

 

Categories:
I have the same question (0)
  • Waed Ayyad Profile Picture
    9,039 Super User 2025 Season 2 on at
    Hi,
     
    Can you show us your code? Where you added the code? in which methods?
     
    Thanks,
    Waed Ayyad
  • Tameem Profile Picture
    33 on at
    Below is the code 
     
  • Verified answer
    André Arnaud de Calavon Profile Picture
    301,210 Super User 2025 Season 2 on at
    Hi Tameem,
     
    This is a standard behavior of the grid control that can't be overridden by X++ logic. The selected record will not show the colors as set in the displayOption method. 
    In this case, as alternative, you can add an icon field showing a yellow warning or a red stop. 
  • Verified answer
    Tameem Profile Picture
    33 on at
     
    Thank you for the suggestion. I tried your method and below are the details how this worked for me.
     
    1. I have created below display method to get the icons.
     public static display container statusIndicator(CustInvoiceJour _this)
     {
         ImageReference imgRef;
         container imgContainer;
         Integer overDueDays;
     
         overDueDays = CustInvoiceJour::daysOverdue(_this);
    
         if(overDueDays <= 90)
         {
             imgRef =  ImageReference::constructForSymbol(ImageReferenceSymbol::GreenCheck);
         }
         else if (overDueDays > 90 && overDueDays <= 119)
         {
             imgRef = ImageReference::constructForSymbol(ImageReferenceSymbol::YellowExclamationPoint);
         }
         else
         {
             imgRef = ImageReference::constructForSymbol(ImageReferenceSymbol::RedX);
         }
         
         imgContainer = imgRef.pack();
         return imgContainer;
    
     }
    1. Added FormImageControl in the grid 
    2. Called the above display method on FormImageControl
    Below are the screenshots of the results
     
     
     
    You can find list of all symbols fonts by following this link.
     
    Thanks

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Abhilash Warrier Profile Picture

Abhilash Warrier 669 Super User 2025 Season 2

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 449 Super User 2025 Season 2

#3
Martin Dráb Profile Picture

Martin Dráb 384 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans