Skip to main content

Notifications

Announcements

No record found.

Dynamics 365 Community / Forums / Finance forum / paint records in diffe...
Finance forum
Answered

paint records in different colors

Posted on by 768

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.

  • dark_knight Profile Picture
    dark_knight 768 on at
    RE: paint records in different colors

    form data source displayOption method worked like a charm for me. Thanks for your answers.

  • huijij Profile Picture
    huijij 19,803 on at
    RE: paint records in different colors

    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

  • Verified answer
    ergun sahin Profile Picture
    ergun sahin 8,812 Super User on at
    RE: paint records in different colors

    I came across an example below. I think my information is a bit old

    d365technext.blogspot.com/.../gridlist-row-color-change-using-method.html

  • Suggested answer
    ergun sahin Profile Picture
    ergun sahin 8,812 Super User on at
    RE: paint records in different colors

    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.

  • Verified answer
    RE: paint records in different colors

    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

Helpful resources

Quick Links

Replay now available! Dynamics 365 Community Call (CRM Edition)

Catch up on the first D365 Community Call held on 7/10

Community Spotlight of the Month

Kudos to Saurav Dhyani!

Congratulations to the June Top 10 community leaders!

These stars go above and beyond . . .

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 288,513 Super User

#2
Martin Dráb Profile Picture

Martin Dráb 225,862 Super User

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans