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 :
Microsoft Dynamics 365 | Integration, Dataverse...
Suggested Answer

Set Colour to field Value in MS CRM

(0) ShareShare
ReportReport
Posted on by 15

Hello everybody!

First of all, I don't know if this is the right forum (here in general) to post this type of question.

I would like to set the color of a value of a field (in the view).

I have 2 columns:

- The first is of type booleanType yes/no - 2 options
- And the second is of type LookupType.

I would like the first column when set to "No", the text color of the lookup to have a different color and a bold/font-weight.

How do I style this? I have the following:

function validate(rowData) {

    var str = JSON.parse(rowData);

    var valid = str.acr_valid_Value;    //get first attribute 
    var name = str.acr_name;            //get second attribute

    if (valid._label == 'No') {
        console.log("into in "   name   " change color please!");
    }

}


Then in Asset Views, I choose the column (the second one) to change properties, I choose the web resource that is the .js and I pass it the name of the validate function, which is my case. The example of the function is taken from here.

Thank you.

Andrei

I have the same question (0)
  • Suggested answer
    Community Member Profile Picture
    on at

    Hi andreicr,

    Maybe you can try to use PCF controls--Colorful Optionset Grid(Colorful Optionset Grid | PCF Gallery).

    Using this control, you can show the OptionsSets using the colors customized using the standard experience. Starting with the release 8, the ColorfulOptionsetGrid works also for Boolean/TwoOptions and for MultiSelectOptionset/MultiSelectPicklist.

    You can download zip file:Release Release 8 - boolean and multipleOptionSets · brasov2de/ColorfulOptionsetGrid · GitHub

    Then you can refer Guidance Notes to customize view as your need:GitHub - brasov2de/ColorfulOptionsetGrid

  • andrescr Profile Picture
    15 on at

    Hi

    Thank you for your help. It's hard to believe how hard MS makes for a simple color change.

    Regards.

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!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > Microsoft Dynamics 365 | Integration, Dataverse, and general topics

#1
Pallavi Phade Profile Picture

Pallavi Phade 102 Super User 2026 Season 1

#2
11manish Profile Picture

11manish 71

#3
Abhilash Warrier Profile Picture

Abhilash Warrier 55 Super User 2026 Season 1

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans