web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Suggested Answer

Tracking user activity on tab and field level

(0) ShareShare
ReportReport
Posted on by 135

Hello all,

Can anyone tell me if it is possible to track user usage per entity, tab and field in CRM?

So how often the user:
- Which field on an entity was used how often?
- Which tabs on an entity were clicked on the most?
- Which entities were used most often?
- This should be evaluable according to a time frame.

Unfortunately I can't find anything about this OOTB and third-party software doesn't seem to be able to do this either.

Thank you very much in advance!

BR

I have the same question (0)
  • Suggested answer
    RodRodriguez Profile Picture
    on at

    Howdy!

    I think you can probably do that using some JavaScript

    To count the number of times a tab is clicked on, you can use the tabStateChange event handler to execute a JavaScript function whenever a tab is expanded or collapsed. You can use a global variable to store the count and increment it each time the function is triggered. For example:

    var tabACount = 0; // Global variable to store the count for Tab A

    function onTabStateChange(executionContext) {

     var formContext = executionContext.getFormContext();

     var tab = formContext.ui.tabs.get("Tab_A"); // Get the tab by name

     if (tab.getDisplayState() === "expanded") { // Check if the tab is expanded

       tabACount++; // Increment the count

    //    alert("Tab A has been clicked " + tabACount + " times");

     }

    }

    I have the "alert" command in there as a placeholder for you to store that variable someplace that you can use later for your analytics.  Maybe create another field in the entity and store the value there.

    To count the number of times an entity is clicked on, you can use the onRecordSelect event handler to execute a JavaScript function whenever an entity record is selected. Again, use a global variable to store the count and increment it each time the function is triggered. For example:

    var accountCount = 0; // Global variable to store the count for Account entity

    function onRecordSelect(executionContext) {

     var formContext = executionContext.getFormContext();

     var entityName = formContext.data.entity.getEntityName(); // Get the entity name

     if (entityName === "account") { // Check if the entity is Account

       accountCount++; // Increment the count

    //    alert("Account has been clicked " + accountCount + " times");

     }

    }

    Again, the alert command is there as a placeholder to store the variable somewhere.

    To count the number of times a field is modified, you can use the onChange event handler to execute a JavaScript function whenever a field value changes. You can use a global variable to store the count and increment it each time the function is triggered. For example:

    var nameCount = 0; // Global variable to store the count for Name field

    function onChange(executionContext) {

     var formContext = executionContext.getFormContext();

     var nameField = formContext.getAttribute("name"); // Get the field by name

     if (nameField.getIsDirty()) { // Check if the field value has changed

       nameCount++; // Increment the count

    //    alert("Name has been modified " + nameCount + " times");

     }

    }

    And once again using the alert as a placeholder for putting that variable somewhere.

    Hope that helps!

  • Suggested answer
    XM-22040801-0 Profile Picture
    11 on at

    Hello,

    Application Insight may be the answer to your needs.

    See community.dynamics.com/.../d365-application-insights-overview

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
ManoVerse Profile Picture

ManoVerse 196 Super User 2026 Season 1

#2
11manish Profile Picture

11manish 129

#3
CU11031447-0 Profile Picture

CU11031447-0 100

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans