Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics 365 | Integration, Dataverse...
Answered

Remove color from choice optionsets

(1) ShareShare
ReportReport
Posted on by 35
Within the maker portal, Dataverse choice fields allow the setting of colour for each option value using the colour picker:

 
The question is, how can you remove the colour from a choice, i.e. setting it back to null? Surely there's a way without deleting and re-adding?

I've tried within the Classic view and sort of managed to hack it to be nothing within some choice fields, but for things like status reason this doesn't work.
 
Setting to /white/ isn't really a fix as this shows up in the grid control.
  • Verified answer
    TD-05111241-0 Profile Picture
    TD-05111241-0 11 on at
    Remove color from choice optionsets
    Hi,
     
    export the field in an unmanaged solution. Extract the solution. Open the customization.xml in best case an text editor (notepad++ with xml extension) or Visual studio, but also notepad will do the job. Look for the color code and remove just the Hexa color code not the color xml.
     
    Before:
                      <option value="100000002" ExternalValue="" Color="#0000ff">
                        <labels>
                          <label description="VMWare" languagecode="1033" />
                        </labels>
                        <Descriptions>
                          <Description description="" languagecode="1033" />
                        </Descriptions>
                      </option>
     
    After: 
                    <options>
                      <option value="100000000" ExternalValue="" Color="">
                        <labels>
                          <label description="Microsoft" languagecode="1033" />
                        </labels>
                        <Descriptions>
                          <Description description="" languagecode="1033" />
                        </Descriptions>
                      </option>
     
    Zip it back to the same name of the solution as it was before. And import and publish.
    That did the trick for me. Deletion of the whole xml statement will not work as it smoehow does not overwrite the existing settings.
    Optionssets are allways a bit reluctand during deployments. When it does not appear later in managed environments. Make a small unmanaged change like change of the name and then remove the active layer. This usually sorta all correct. 
     
    I would only recommend changing XML of a solution, when you know what you are doning. Unwanted changes may lead to unexpected errors and are very hard to find then wichout the right backups and tools. But if you do it in a calm very focused manner it should be doable.
     
    BR Torsten
  • Crouchy Profile Picture
    Crouchy 7 on at
    Remove color from choice optionsets
    What is very frustrating is the control even has the Enable OptionSet colors set to No.  This seems to be a MSFT bug they need to fix.
     
  • Suggested answer
    Lorix Profile Picture
    Lorix 2 on at
    Remove color from choice optionsets
    While you can not directly remove the color for an option, you can disable the coloration all together for an entity, by switching it back to the old grid control.
    This at least works for the "case" entity, which got a new Control in the wave 2 2024 release.
    Go to a solution in the classic view -> Entities -> Case. Open Controls and switch it back to "Read-only Grid (default)". This did the trick for me with cases.

  • PierrePoulin Profile Picture
    PierrePoulin 32 on at
    Remove color from choice optionsets
     Did somebody find a solution to this problem? I have the same problem. 
  • sharonsammy123 Profile Picture
    sharonsammy123 2 on at
    Remove color from choice optionsets
    Hi adamread,  did you find a solution to this problem? I have the same problem. Currently set back to white but looks a little weird on the grids.
  • Dengliang Li Profile Picture
    Dengliang Li Microsoft Employee on at
    Remove color from choice optionsets
    Hi,
     
    Unfortunately, I'm afraid that's not possible.
    I tried by exporting the solution for that option set and found in the solution that the option with the label color changed would have this extra code.
    I removed this code and re-imported it back into the environment and this did not work.
     
     
    Best Regards,
    Dengliang Li
     

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

Congratulations 2024 Spotlight Honorees

Kudos to all of our 2024 community stars! 🎉

Meet the Top 10 leaders for December

Congratulations to our December super stars! 🥳

Start Your Super User Journey

Join the ranks of our community heros! 🦹

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,784 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,476 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans