How to Customize Dynamics 365 Contact Initial Colors by Status
Question details
The user wants to change the randomly assigned background colors of contact initials to visually indicate specific contact statuses, such as displaying red for emergency contacts.

- Product
- Dynamics 365
- Device & OS
- not provided
- Scenario
- Managing contact records in the CRM and attempting to use the contact's initial circle color as a quick visual indicator for their status.
- Observed behavior
- Dynamics 365 automatically assigns random colors behind the first two initials of a contact, and these colors have no correlation to the contact's actual status.
Ensure you have System Administrator or System Customizer privileges in Dynamics 365, and always test your JavaScript or TypeScript customizations in a dedicated development environment before deploying them to production.
Implement Custom Code to Style Contact Initials
Use a customized JavaScript or TypeScript web resource to evaluate the status field and dynamically change the initials' background color.
Because Dynamics 365 does not offer a built-in, no-code setting to assign specific colors to the initials based on field data, developers must implement a custom solution. By writing a script that triggers when the contact form loads, you can read the status field and apply the corresponding CSS styling to the initials container.
Determine the exact logical name of the field (e.g., a custom option set for 'Emergency Contact') that will dictate the color logic in your script.
Create a JavaScript or TypeScript file that retrieves the value of the target field and applies the desired CSS color properties to the initials element on the form.
Navigate to Power Apps, open your solution, and upload the new script as a JavaScript Web Resource.
Open the main Contact form editor, go to Form Properties, add your Web Resource, and register the function to trigger on the 'OnLoad' event.
Save and publish all customizations. Hard refresh your browser on a contact record to ensure the new colors are applied based on the status.

Boost Your Productivity with WPS Office
While you customize your Microsoft Dynamics 365 environment for CRM workflows, WPS Office provides the perfect, lightweight alternative for handling your daily document tasks. Edit reports, spreadsheets, and presentations with high compatibility and zero subscription fees.
- 1. Download the installer: Visit the official WPS Office website and click the free download button for your operating system.
- 2. Install the software: Run the downloaded installer file and follow the on-screen instructions to complete the setup.
- 3. Open and edit your files: Launch WPS Office to instantly open, edit, and save your existing Microsoft Word, Excel, and PowerPoint files.

Frequently Asked Questions
Can I change the Dynamics 365 contact initials color without using code?
No, out-of-the-box Dynamics 365 assigns these colors randomly. Changing them based on a status field requires a developer to implement custom JavaScript or a PCF control.
What do the default colors on contact cards mean in Dynamics 365?
The default colors do not carry any specific meaning or denote a status. They are randomly assigned by the system simply to visually differentiate records when a custom profile picture is not uploaded.
Will DOM manipulation in JavaScript break after a Dynamics 365 update?
Yes, unsupported DOM manipulation can break when Microsoft updates the UI structure. It is highly recommended to use the Power Apps Component Framework (PCF) for long-term stability when creating custom visual indicators.




