If you have recently upgraded to Microsoft Dynamics CRM 2011 Update Rollup 12 or above, you might be experiencing the following error message when selecting a view, doing an advanced find or a quick lookup for certain entities:

Table alias a_dc9b80f8c78146d89fd6a3b610836975 is not unique amongst all top-level table and join aliases Error Resolution

In the UR 12 and above, Microsoft added some new indexes to certain entities, including:

  • Cases
  • Opportunities
  • Competitors
  • Contact
  • Business Unit
  • Connection
  • Connection Role
  • KB Article
  • Lead
  • Product Sales Literature

While good for performance, something about the new indexes doesn’t quite translate over appropriately in all cases. In my experience, this has to do with views that contains some columns or filter criteria from linked (or associated) entities. You can always delete and recreate custom views from scratch… But that’s not an option if it’s a system view, like a quick find view (as was my case for this issue!)

Here’s the resolution I used. It involves manual modification of the FetchXML code for the view:

  1. Create a solution, add the affected entity or entities.
  2. Export the solution.
  3. Extract the ZIP file contents.
  4. Edit the customization.xml.
  5. Search for the name of the view to find the <fetchxml> element associated with it.
  6. Inside the <entity> tag, find the <link-entity> elements, and remove them entirely (and everything within them).
  7. Save the file and re-ZIP the contents.
  8. Import the modified ZIP file to replace your solution.
  9. Publish all changes from the import.

Now the view should be error free!

Be careful modifying FetchXML directly, or you could screw up your entire solution and/or implementation. Best to test it first in a non-production environment! Best of luck to you.

Like this post? Share it!