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

Notifications

Announcements

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

News and Announcements

Season of Giving Solutions is Here!

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 > Microsoft Dynamics 365 | Integration, Dataverse, and general topics

#1
iampranjal Profile Picture

iampranjal 68

#2
André Arnaud de Calavon Profile Picture

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

#3
BillurSamdancioglu Profile Picture

BillurSamdancioglu 40 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans