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:
  • Verified answer
    Tameem Profile Picture
    33 on at
    Row Selection and Color Visibility in D365 FinOps Form
     
    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
  • Verified answer
    André Arnaud de Calavon Profile Picture
    293,278 Super User 2025 Season 1 on at
    Row Selection and Color Visibility in D365 FinOps Form
    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. 
  • Tameem Profile Picture
    33 on at
    Row Selection and Color Visibility in D365 FinOps Form
    Below is the code 
     
  • Waed Ayyad Profile Picture
    7,941 Super User 2025 Season 1 on at
    Row Selection and Color Visibility in D365 FinOps Form
    Hi,
     
    Can you show us your code? Where you added the code? in which methods?
     
    Thanks,
    Waed Ayyad

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

Daivat Vartak – Community Spotlight

We are honored to recognize Daivat Vartak as our March 2025 Community…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 293,278 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 232,011 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156 Moderator

Leaderboard

Product updates

Dynamics 365 release plans