Category Archives: XrmToolBox
XrmToolbox is an amazing free utility formed by many tools that have been developed by the community. During the last weeks, I have been particularly using and enhancing the Attribute Usage Inspector. This tool tells you the fields utilisation in your Dynamics 365 Customer Engagement (CRM) environment.
In this article, I’ll show how I have extended this utility to allow FetchXML queries which defines the scope of the attributes to be analysed.
Visualising what attributes are used and what aren’t can be extremely helpful in your project analysis to understand adoption and drive new features.
In the above Figure – 1, you can see the attributes utilisation for the opportunity entity. In this case, the tool is using all the records and attributes in the system. You could also filter these attributes or even use a SQL query:
Additionally, I have recently added a new option to allow a FetchXML query (see “Use FetchXML query” in above Figure 2), which will define what attributes and records will be analysed based on the results of the same query.
Once you have selected the new setting “Use FetchXML query“, you will find a new dialog after you click on an entity:
The new FetchXML Query dialog allows basically 3 things:
- Generate the FetchXML query using a System View.
- Generate the FetchXML query using a User View.
- Use your own FetXML query just editing or pasting the text in the editor.
The FetchXML Query dialog also validates the query in run time to avoid potential mistakes.
For instance, let’s say we want to understand certain opportunity attributes utilisation for those records created in the last months. Using the XrmToolbox FetchXmlBuilder, I have generated my own FetchXML:
I will then paste the same query in the FetchXML Query dialog shown in Figure 3:
After clicking OK, the tool will use the same custom query to provide the corresponding results:
Notice how only a subset of the attributes are presented in the results and the number of records and % utilisation are determined by the FetchXML query.
How do I get this tool?
In case you were already using it, notice there is a new version 1.2018.9.11, which contains the new FetchXML query feature.
Where is the code?
The whole tool is open source and you can find the code here: