Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

White color on field value background - how to remove?

(0) ShareShare
ReportReport
Posted on by 1,328

I'm using javascript to color a section green and have it appear when an opportunity is won. However there is some white color coming from the field values. Can someone please tell me why these appear and how to remove them? I even tried  "document.getElementById("fieldname").style.backgroundColor = "90EE90"; but that did not work.

Marked in red:

24173.Capture.PNG

*This post is locked for comments

  • Suggested answer
    Aric Levin - MVP Profile Picture
    30,188 Moderator on at
    RE: White color on field value background - how to remove?

    Hi,

    First of all, let me start by saying that what you are doing is unsupported. You can not access or modify the DOM from within the CRM form. It might work now as you are in CRM 2015, but very likely to break in the future on a future release or service pack.

    I would look at the css of the control (Press F12 in your browser window to get the exact name).

    An example of the element for a checkbox control is as follows:

    <input class="ms-crm-CheckBox " id="creditonhold_i" type="checkbox" value="1">

    The id of the control has a suffix of _i, which means your field name would be document.getElementById("fieldname_i").style...

    Make sure you confirm the actual input id before you use it with document.getElementById.

    Hope this helps.

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

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Adis Hodzic – Community Spotlight

We are honored to recognize Adis Hodzic as our May 2025 Community…

Kudos to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Microsoft Dynamics CRM (Archived)

#1
Mohamed Amine Mahmoudi Profile Picture

Mohamed Amine Mahmoudi 83 Super User 2025 Season 1

#2
Community Member Profile Picture

Community Member 52

#3
Victor Onyebuchi Profile Picture

Victor Onyebuchi 6

Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans