Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8016315
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T20:30:22+00:00 2026-06-04T20:30:22+00:00

How can I colorize the CRM grid on Dynamics CRM 4? I would like

  • 0

How can I colorize the CRM grid on Dynamics CRM 4?

I would like to automatically display the list of an entity with a back color when loading the view.

My goal is to have different colors depending on the status of the listed entity. For example, I want to have a color for cases that have a date field that is in the past and another color for cases that have this date in the future.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T20:30:24+00:00Added an answer on June 4, 2026 at 8:30 pm

    The solution described below is a change not supported by Microsoft (that means, use it at your own risks). Plus, there is no guarantee that it won’t be broken when applying CRM rollups.


    On the CRM server, modify the C:\Program Files\Microsoft Dynamics CRM\CRMWeb\_static\_grid\grid.htc file:

    Add the following code at the end of the initializeData() function:

    if (window.location.href.toLowerCase() == 
        "http://CrmServerName:5555/OrganizationName/cs/home_cases.aspx") {
        // We ensure that we are on the organization we want to colorize and that we 
        // are on the Cases page
    
        var colorizeColumn = InnerGrid.FindColumnIndex("new_date");
    
        if (colorizeColumn > 0) {
            // We ensure that the column we'll use to colorize is present
    
            for (var i = 0; i < InnerGrid.AllRecords.length; i++) {
                // For each line
    
                // Build the date value from the displayed date
                var new_date_displayed = InnerGrid.AllRecords[i][3].
                    cells[colorizeColumn].innerText;
                var new_date_value = new Date(new_date_displayed.substring(6,10), 
                                              new_date_displayed.substring(3,5) - 1, 
                                              new_date_displayed.substring(0,2), 
                                              new_date_displayed.substring(11,13), 
                                              new_date_displayed.substring(14,16), 0, 0);
                // Get current date
                var current_datetime = new Date();
    
                if (new_date_value <= current_datetime) {
                    InnerGrid.rows[i].style.backgroundColor="ff0066";
                } else {
                    InnerGrid.rows[i].style.backgroundColor="ff6600";
                }
            }
       }
    }
    

    And here’s what you get:

    Colorized grid

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I would like to change the color of the image/canvas. My existing code: var
I'd like to color blend (colorize by specified alpha value) the area of a
Can this be done? It seems like this should be possible. In general, I
Can I store an array such as [1,2,3,4] or some JSON like {name:John Johnson,street:Oslo,
Can PHP PDO extension bind nested objects automatically ? I mean using foreign key
Can I run this in a Windows command prompt like I can run it
I would like to write something similar to cout << this text is not
When I have a diff, how can I colorize it so that it looks
I have a series of checkboxes and I would like to append the text
can anyone help me in trying to check whether JavaScript is enabled in client

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.