2
votes

I am building a plugin that utilizes the new Business Process Flow in Dynamics 2013, and in order to take full advantage of the easy to use check-list style menu I have added two new attributes to the default Opportunity entity in Dynamics CRM.

I have done this in the plugin's customizations.xml file by adding the attributes to the Opportunity Entity under the EntityInfo->Entity->Attributes section of the Entity xml.

The addition of this field to the Opportunity works just as expected, though I am running into issues when uninstalling the plugin.

Since this plugin will be widely available, I can't expect users to keep it on their systems forever.

On uninstallation of the plugin, however, Opportunities can no longer be viewed in the CRM 2013 Online. When I try to view one I get the following:

Critical

Query Builder Error

The specified field does not exist in Microsoft Dynamics CRM

Is there something I can do within the customizations.xml file to ensure that once the plugin solution has been uninstalled, Dynamics CRM will no longer reference these fields?

note: This issue occurs on a brand new instance of Dynamics CRM 2013 (trial) with the plugin simply installed / uninstalled, so no other customizations are linking to changes from the plugin and causing the crash

1
Why did you add fields via the customization xml and not through the UI of CRM?Johan van Dam
Because I'm building a plugin solution that will be installed on a variety of accounts. The original changes to the customization were done via the UI. I then exported the solution and added all of the missing dependencies to the plugin package.Maixy
Query Builder Error is typically something that shows up when a view, form or anything else that is producing a FetchXML statement to get data tried to request a field that doesn't exists (anymore). If you know which fields you have removed then do a full export of all customizations, unzip and search through the customizations.xml file for these fields. You will most probably find a reference or two in a view or so that keeps a reference. Once found then open up the Form/View Designer, remove the field/column, publish all and see if that helps.Casper Jensen

1 Answers

0
votes

If you were to make this change via the UI, it would block you from deleting these fields until all dependencies have been removed as well. Because you chose to do this without the assistance of the UI, it is breaking on you. If you go back and make this change via the UI, the customizations.xml file should be properly updated and you should be good to go (or it will error and say where there is still a dependency - making it easy to go and fix it).