PowerObjects Blog 

for Microsoft Business Applications

Sitemap Contains Reference to an Entity Not Found in the Metadata Cache

Sitemap Contains Reference to an Entity Not Found in the Metadata Cache

You may encounter an error where the sitemap for Organzation xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx contains a reference to the entity "entity_name," but that entity was not found in the metadata cache.

This error shows up in the Application Event Log of the CRM web server when there are references to entities that do not exist in the sitemap. The most common reason for this issue may be when customizations are moved between environments and entities get deleted in this process, but the sitemap still has references to them. Below are the steps to resolve this error and stop the errors from appearing in the Event Log. It's a good way to keep things clean in the CRM sitemap.

  1. Go to the Application Event Log of the CRM server and copy the GUID of the Organization and the entity name which is throwing the error. (Ignore this step if there is only one organization.)

    Entity Not Found in the Metadata Cache

  2. Find the name of the Organization by querying the CRM database using the following statements. (Again, ignore if there is only one Organization.)

    from Organization where ID=
    'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'[Enter the organization ID you found in the event log]

  3. Create a new unmanaged solution with just the sitemap and export the solution for the organization identified in step 2 (or just the organization if it is the only one).

  4. Make a back-up of this solution if something goes wrong with editing the XML and you need to revert to its original state before the change. Unzip the files of the solution and open the customizations.xml file.
  5. In the XML, search for the entity name found in the event log and see if there are any tags that start with "" or "" or "". Basically, look for all the references of this entity name, and remove those sections from the sitemap.
  6. Once all the reference are removed, re-package the solution (remember, you need to create a zip file of all the files in the unzipped folder) into a new .zip file and import it back into CRM.

  7. Finally publish the customization upon successful import. This should fix the error.

It's important to note that the user performing the above process must have the following privileges:

  • System Administrator/System Customizer role in CRM
  • Local Administrator access on CRM web server machine
  • Local Administrator on SQL server for CRM and select permission on the MSCRM_CONFIG database

Also, when deleting anything in Microsoft Dynamics CRM, always back up the customizations. You might specifically back up the sitemap before editing and re-import this solution in case something goes wrong with the sitemap update.

Happy CRM'ing!

By 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.

One comment on “Sitemap Contains Reference to an Entity Not Found in the Metadata Cache”

  1. Hi,

    I have this exact problem. The issue is that when I extract the solution (with the SiteMap in it), there is no mention of the entity that is giving me the error within the customizations.xml file. Any ideas?

PowerObjects Recommends