Enhancing Dataverse Views with Custom Icons, Tooltips & Visualizations (Dynamics 365)


While working with Model-driven apps, sometimes a visual indicator can make a view much easier to scan.

For example, instead of displaying simple text like Priority – Hot, Warm and Cold.

we can display an icon based on the value along with the field value. And we can also display a tooltip when the user hovers over the icon.

Microsoft Power Apps supports adding custom icons and tooltips to columns in views using image web resources and JavaScript. The JavaScript function determines which image and tooltip should be displayed for each row.

How it works

The JavaScript function receives the row data and the user’s LCID:

function displayPriorityIcon(rowData, userLCID) {
    var data = JSON.parse(rowData);
    var priority = parseInt(data.prioritycode_Value, 10);

    switch (priority) {
        case 1:
            return ["custom_PriorityHigh", "High Priority"];
        case 2:
            return ["custom_PriorityMedium", "Medium Priority"];
        case 3:
            return ["custom_PriorityLow", "Low Priority"];
        default:
            return ["", ""];
    }
}

The function returns an array containing: [imageName, tooltip]

For example: return [“custom_PriorityHigh”, “High Priority”];

The image names refer to image web resources that we add to the solution.

The userLCID parameter can also be used when tooltip text needs to be localized for different users.

Microsoft recommends using 16 × 16 pixel images for these icons. Also, when working with Choice columns, it is better to use the underlying integer value rather than the label, since labels can be localized.

Configure the view

The JavaScript web resource and function are then specified for the column in the view.

Open the view for customization, select Edit Properties for the column

Specify the Web resource and Function Name there.

Once published, the appropriate icon and tooltip are displayed based on the row data.

This can be particularly useful for columns such as:

  • Priority
  • Risk
  • SLA status
  • Customer health
  • Approval status
  • Integration status

The icon provides the visual signal, while the tooltip provides additional context.

A note about Column Visualizations

There is also a newer option available in Power Apps: Custom Column Visualizations for grids and views.

These can render column data as a Heat Map, Line Chart, Radial Dial, or Star Rating, allowing users to compare values visually within a grid.

I covered this feature in more detail in my earlier post: Column Visualizations for Grids / Views (Preview) – Dataverse / Dynamics 365

So, if we simply need a small dynamic icon with a tooltip, custom icons are a useful option. If we need a richer visualization of the underlying data, Column Visualizations may be worth considering.

Custom icons are configured per view, whereas the newer Column Visualizations are configured on the column and automatically appear wherever that column is used in grids/views.

Custom icons are configured as part of the view definition, whereas Column Visualizations are configured at the column level.

Custom icons and tooltips are supported for read-only grids. They aren’t supported for editable grids.

Hope it helps ..

Advertisements

Clearing Dirty Fields in Forms to Avoid Unnecessary Save Prompts (Dynamics 365 / Dataverse)


In Dynamics 365 forms, we often run into situations where a record looks unsaved even though the user hasn’t made any manual changes. This usually happens when fields are updated in the background by scripts. When that happens, those attributes are flagged as dirty and the form behaves as if the user made edits. The result is that whenever users try to navigate away, they are interrupted by the familiar “You have unsaved changes” popup.

Also Check – https://nishantrana.me/2025/09/09/finding-dirty-unsaved-fields-on-the-form-using-javascript-browser-console-dynamics-365-dataverse/

In our case, we were getting this issue for fields which were already hidden from the form. Also here as the record was on a particular stage, where we were setting all the fields in the form read-only, and also cancelling the save event. Because of which user was also not able to save the form.

A computer screen shot of a computer program

AI-generated content may be incorrect.

The way we fixed this issue was to scan all the attributes on the form in onload, detect which ones are dirty and reset their submit behaviours. By setting their submit mode to “never“, these fields were not included in the save operation, and the form was now showing the saved state, thus no unsaved changes prompts.

clearAllDirtyFields: function (executionContext) {
    var formContext = executionContext.getFormContext();

    // Delay to allow system updates (rollups/calculated fields) to complete
    setTimeout(function () {
        formContext.data.entity.attributes.forEach(function (attr) {
            if (attr.getIsDirty()) {
                attr.setSubmitMode("never");
                console.log("Dirty flag cleared for: " + attr.getName());
            }
        });
        console.log("All dirty fields cleared from the form.");
    }, 3000); // adjust delay as needed
}

This approach should still be used with some caution. The best practice is to first understand why certain fields are showing as dirty and, if possible, fix the underlying cause. The script should only be used in specific situations where we are confident that the dirty fields are not needed for saving the record. It’s also important to add the right checks or conditions so that it doesn’t run everywhere unnecessarily.

For example, in our case we only applied it when the form was in a particular status where it was expected to be read-only for the user. The fields were already hidden, so letting them stay dirty served no purpose.

Hope it helps..

Advertisements

Finding Dirty / Unsaved Fields on the Form Using JavaScript / Browser Console (Dynamics 365 / Dataverse)


Sometimes while debugging forms in Dynamics 365, we need to know which fields have been modified but not yet saved. These are called dirty fields, and they can be quickly identified by running a small JavaScript snippet directly from the browser console.

We can open the form, press F12 to bring up the developer tools, go to the Console tab, and paste the following code

(function () {
    var dirtyFields = [];
    var attributes = Xrm.Page.data.entity.attributes.get();

    attributes.forEach(function (attribute) {
        if (attribute.getIsDirty()) {
            dirtyFields.push(attribute.getName());
        }
    });

    if (dirtyFields.length) {
        alert("Dirty fields: " + dirtyFields.join(", "));
    } else {
        alert("No dirty fields found.");
    }
})();

This script loops through all the attributes on the form and checks if they are dirty using getIsDirty(). If it finds any, it shows their names in an alert, otherwise it shows a message saying no dirty fields are found.

For example, if we modify First Name and Email on the Contact form without saving, it will pop up an alert showing:

A screenshot of a computer

AI-generated content may be incorrect.

Here we are using Xrm.Page even though it is deprecated, because it is still the quickest way to test such snippets directly from the console for debugging purposes. In actual form scripts, we should always use formContext.

Hope it helps..

Advertisements

Recent and Pinned options are available now for multi-session app’s sitemap (e.g. Customer Service Workspace)


As we would have observed now we have the Recent and and Pinned records option available for the Customer Service workspace app.

A screenshot of a computer

Description automatically generated

The users can see the same Recent and Pinned records while moving between the Customer Service workspace and Customer Service Hub app, giving a consistent experience.

Recent :

Pinned :

Get all the details.

Hope it helps..

Advertisements

Select record quickly inside Lookup control – Model-driven app /Dynamics 365


There is a small enhancement added to the Lookup Control as part of Release Wave 2.

After performing a search for a specific record inside the Lookup Control dropdown menu, e.g. we have performed a search on “co*” on the Customer Lookup for Case.

We can press Enter to have the first item in the list selected.

Get more details

Hope it helps..

Advertisements

New features added in Grid– Dataverse / Dynamics 365


With Release Wave 2, we can see the below features added to Grid.

The option to Group By, Column Width, Move Left and Move Right.

A screenshot of a computer

Description automatically generated

Group By (Rating) –

A screenshot of a computer

Description automatically generated

Move Left and Move Right as expected will move the selected column accordingly. Not only that we can also Drag and Drop the columns, here we have dragged the Rating column as the 1st column.

A screenshot of a computer

Description automatically generated

Column Width – allows us to specify the preferred width of the column.

A screenshot of a computer

Description automatically generated

Totals > None, Average, Maximum, Minimum, Sum.

For the numerical column, Annual Revenue in this case we get the option to calculate the total

A screenshot of a computer

Description automatically generated

Selecting Total > Sum, adds a row at the bottom, showing the total sum

A screenshot of a computer

Description automatically generated

Similarly selecting minimum shows the minimum value.

A screenshot of a computer

Description automatically generated

Hope it helps..

Advertisements