Hello everyone,
I'd like my form records to be painted in different colors depending on the records values in the grid. What is the best place for such change? init() on form datasource? What is the best approach?
Thanks.
use the form data source displayOption method, it has two parameters, the first one is the record, the second one is a FormRowDisplayOption wich you can use to change the back color based on the values of the first parameter
I haven't tested it, but if I'm not mistaken, we cannot use grid color in d365fo.
With htmlviewer, the table can be created and painted manually, but I'm not sure if it's worth it.
Instead, an field can be added to help visually perceive it.
I came across an example below. I think my information is a bit old
d365technext.blogspot.com/.../gridlist-row-color-change-using-method.html
Hi Azat,
As mentioned,you can add colors to a form control of a standard or custom form by using event handler method “OnDisplayOptionInitialize“ :
docs.microsoft.com/.../specify-color-font-background-controls
allaboutdynamic.com/.../
regards
form data source displayOption method worked like a charm for me. Thanks for your answers.
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.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
CA Neeraj Kumar 2,100
André Arnaud de Cal... 890 Super User 2025 Season 2
Sohaib Cheema 633 User Group Leader