Universal Search for Solution Source Files
If you’ve used Universal Search in the XrmToolBox in the past you know that you can perform powerful wildcard searches in Dataverse across Tables and Metadata. If you haven’t used it, you can read more about it here. However, since its release, there has been a lot in the Power Platform that has changed. Some components aren’t searchable directly in Dataverse using the APIs available and require a different view of the data in order to search them.
So, What’s the Problem?
Two good examples of Power Platform components that aren’t easily searched, today, are Canvas Apps and .NET Plugins. Both store some of their information inside of tables in Dataverse that you can search, but not all of that information is in text form.
Apart from these two troublesome components, there is other information stored in Dataverse in sometimes less than ideal searchable formats. For instance, some tables contain unformatted or “uglified” XML or JSON stuffed into columns that makes it difficult to find the specific value you are looking for without copying and pasting it and then formatting.
In order to make Universal Search more universal and cover these cases, I’ve added the ability to extract solutions from Dataverse and “unpack” them to search across the files that make up a solution.
Introducing Source Code Search
You can now search the source code of a solution using the “Solution” search option in Universal Search and selecting a solution from the dropdown that appears. The tool will export the solution, unpack it and format the file contents of the unpacked solution in an easily human readable way prior to searching for the value you specify. If the file is an XML or JSON file, it will be prettified before searching. In the case of the Canvas App or .NET Plugin dll we go a step further.
The Canvas App representation in an unpacked solution, today, is a msapp file that is actually just a zip file with files contained inside that represent the Canvas App itself. This includes the PowerFX formulas, control information and other metadata about the app. By unzipping this file after the solution is exported, Universal Search can find text within the app that was previously hidden from view when searching directly in Dataverse.
The .NET plugin representation in an unpacked solution is a .dll file that is a binary of compiled .NET source code. In this case it’s not as easy as unzipping a plugin to view its original source code. However, there are open-source tools for decompiling .NET dlls that allow us to view most binary’s source code in a “good enough” way to be able to search for keywords using Universal Search. By first, decompiling the dll to disk we can then search for keywords in the file and display the results in Universal Search. Double clicking a specific result will open the source file for you to view.
Want to try it out?
Universal Search is available as a plugin for XrmToolBox, a free application that provides a set of tools to work with Dataverse and Dynamics 365. To install Universal Search, follow these steps:
- Download and install XrmToolBox from here if you don’t have it already.
- Launch XrmToolBox and click on the Plugins Store button on the toolbar.
- Search for Universal Search and click on the Install button.
With the addition of these new capabilities and some minor UX fixes to the Universal Search tool. The tool is now easier to use and more powerful than ever. Would love to hear your feedback on this and potential other ways to search for data in Power Platform that could be added to the tool. If you have any issues or questions, be sure to let me know by checking existing issue or opening a new issue on the GitHub.