There are times when we would like to search the content of our web resources to look for specific unsupported code or to just search for specific content.

Typically, this would be done by searching a source code repository and looking for matching files. While this works, sometimes it would be easier and would save time if we could pass in multiple keywords and generate a file that lists all the web resources with those keywords. This is particularly helpful when you have clients upgrading to newer version of Dynamics 365.

How to Search Web Resources

The approach below describes how we can search by using the Dynamics 365 Service. Alternatively, if you have an On-Premises environment you could request your Administrator to run the SQL query and return the results.

1. Let’s define the keywords we want to search and any web resources we want to exclude from the search. This would usually be third party solutions that we have added, etc.

web resource content

 

2. We can now use a Query to retrieve the content of web resources from Dynamics 365 by specifying our criteria to only return the web resources we are interested in. Since we cannot directly query the content of the web resource, we would have to query it after we convert it from the base 64 string.

web resource content

 

3. Once we have the web resource content mapped to the name of the web resource, we can use the keywords we have defined to start searching. Since a web resource could match on multiple keywords, we get the distinct one in the last step.

 

4. Now that we have the list of all the web resources, we can output this information to a file easily.

web resource content

There you go – a quicker way to search for your custom web resource content. Subscribe to our blog today to start receiving more Dynamics 365 tips and tricks in your inbox!

Happy Dynamics 365’ing!

Avatar for Joe D365

Joe D365

Joe D365 is a Microsoft Dynamics 365 superhero who runs on pure Dynamics adrenaline. As the face of PowerObjects, Joe D365’s mission is to reveal innovative ways to use Dynamics 365 and bring the application to more businesses and organizations around the world.