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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Need change the colour of text field value in Dynamics 365

(0) ShareShare
ReportReport
Posted on by 340

Hi Team,

I got to know there is no supported way to  colour of text field value in Dynamics 365 .

Is there any unsupported way for it?

*This post is locked for comments

I have the same question (0)
  • Verified answer
    a33ik Profile Picture
    84,331 Most Valuable Professional on at

    Hello,

    This is definitely unsupported but worked for me:

    parent.$("[data-for-id='<put your field schema name>_label']:first-child").css("color", "red");
    parent.$("#<put your field schema name>_i").css("color", "red");


    For name field script is following:

    parent.$("[data-for-id='name_label']:first-child").css("color", "red");
    parent.$("#name_i").css("color", "red");


  • Suggested answer
    gdas Profile Picture
    50,091 Moderator on at

    Hi Aimy ,

    There is no supported way you can change text field color , if you go for unsupported way make sure this may not work  in future release . So think twice before use unsupported code. I would suggest to build custom HTML for that if the form view read only then.  I am saying as because let say you have change  text field value color  in the update form then if you type any value in the text box again the color will change to black .

  • Suggested answer
    Preeti Sharma Profile Picture
    2,678 on at

    Hi,

    "Theme" in CRM can be used to change Color scheme. Please follow below links:

    1. www.preact.co.uk/.../microsoft-dynamics-crm-themes-explained

    2. www.powerobjects.com/.../are-we-sensing-a-theme-here-personalize-dynamics-crm-2015-with-themes

    Hope this helps:)

  • Suggested answer
    Ben Thompson Profile Picture
    6,350 on at

    As Preeti says the Dynamics themes functionality allows you to customise part of the system's look and feel including the background of the current active  control. What it does not offer is control of the background colour of all the attributes on the form.

    I really wouldn't recommend doing anything unsupported at the moment as 9.0's web refresh interface is only temporary and is very different from the unified interface which you can already see if you choose one of the apps (not the default app) in the Dynamics 365 menu...

    Longer term the custom control framework will allow you to customise most controls in any way you want to do so. So my advice would be to wait until the next release and start learning a bit about React...

  • Suggested answer
    Nithya Gopinath Profile Picture
    17,078 on at

    Hi Amiy,

    You can use the unsupported customization as shown below.

    window.parent.document.getElementById("textFieldLogicalName").style.color='red'

    Hope this helps.

  • Amiy  Profile Picture
    340 on at

    Hi Nithya,

    I used below script on the on load event but it is not working . Can you let me know what i am missing here

    function ChangeBackground()

    {

    var textValue=window.parent.document.getElementById("fieldname").style.color='red';

    }

  • Suggested answer
    Nithya Gopinath Profile Picture
    17,078 on at

    Hi Amiy,

    Use the code below.

    function ChangeBackground()
    {
     window.parent.document.getElementById("fieldname").style.color='red';
    }

    Hope this helps.

  • Amiy  Profile Picture
    340 on at

    Its still not working .

  • a33ik Profile Picture
    84,331 Most Valuable Professional on at

    Have you tried what I posted?

  • Suggested answer
    Amiy  Profile Picture
    340 on at

    Thanks Andrew . The code is working perfectly .

    Does it also works for the option set value?

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

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 CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans