Microsoft Dynamics Tip

Microsoft informs us that custom icons in list views can display in the Unified Interface, classic web client, mobile app, and App for Outlook.

They say, “Admins and customizers can add graphics to a view and establish the logic used to select a graphic based on the column value using JavaScript.”

This lets you customize list views that display icons next to numerical or text values.

Microsoft shares this example:

Screenshot Courtesy of Microsoft

To add custom graphics and JavaScript as web resources to your Microsoft Dynamics 365 environment, follow these instructions from Microsoft:

1. Create your new graphic files that are needed for your customization. Microsoft recommends an icon size of 16×16 pixels or larger. Larger file sizes will be scaled down.

2. Write one or more Java Script functions to establish which icons will be shown for which values. Microsoft says, typically, you’ll need one function for each colunn you want to customize.

They say, “each function must accept a row data object and a language (LCID) code as input and return an array containing an image name and tooltip text.”

Click here for a Sample JavaScript function for reference.

3. Sign into your Microsoft Dynamics 365 environment, and then open your solution explorer.

4. Your “Default Solution” window will pop up. Navigate to “Components” and then click “Web Resources.”

5. Now, you will upload your custom graphics, one at a time, as web resources.

To do this, Microsoft advises you to click the “New” button in the toolbar to create a new web resource. “Another pop-up window opens to help you create the resource.” When this happens, proceed with these steps:

  1. “Give the new resource a meaningful Name. This is the name that you’ll use to refer to each graphic from your JavaScript code.
  2. Set the Type to the graphic format you’ve used to save your graphic file (PNG, JPEG, or GIF).
  3. Select Choose File to open a file browser window. Use it to find and select your graphic file.
  4. Add a Display Name and/or Description if you wish.
  5. Select Save and then close the Web Resource window.”

6. Repeat the steps in number five for each graphic file you have.

7. Add JavaScript as your final web resource when you’re ready. Click “New” on your toolbar to create a new web resource. Another pop-up window will open to help you create this resource.

Microsoft advises the following steps to complete this process:

  1. Give the new resource a meaningful Name.
  2. Set the Type to Script (JScript).
  3. Select Text Editor (next to the Type setting) to open a text-editor window. Paste your Javascript code here and select OK to save it.
  4. Add a Display Name and/or Description if you wish.
  5. Select Save and then close the Web Resource window.

8. In your “Default Solution” pop-up window, expand “Components” > “Entities”, and then find the entity you want to customize.

9. Expand your entity and click its “Views” icon.

10. Now, you will see a list of views for the entity you selected. Select a view from your list. Now, open “More Actions” in your drop-down list in your toolbar and click “Edit.”

11. Another pop-up window will open with controls to edit your selected view. This window will show each column that’s part of your vivew. Click the target column and then click “Change Properties” in your “Common Tasks” box. “Change Column Properties” will open.

Microsoft encourages you to make these settings next:

  • “Web Resource: Specify the name of the web resource that you created to hold your Javascript functions (select Browse to choose from a list).
  • Function Name: Type the name of the function that you wrote to modify the selected column and view.”

12. Click “OK” to close your “Change Column Properties” dialog.

13. Click “Save and Close” to save your view.

14. “Repeat these steps for each entity, view, and column as needed”

15. When you’re done, click “Publish All Customizations” to publish your changes. “Then, close the Default Solution window.”

Do you need help navigating your Microsoft Dynamics 365 environment? Let our CRM Support Team help you resolve ongoing concerns and issues.

Learn more about our support service offerings here.


Contact Us Today

To learn more about Ledgeview’s Expertise

Related Articles