Unable to publish all in CRM 2013
I am working with a Customer now who is very savvy an wants to do a lot himself, which I generally encourage as this one of the inherent strengths of Dynamics CRM and it would be sad to take it away. Of course we need a healthy discussion on where the line should be drawn on where he should stop configuring and I continue. In larger systems, you also need to take sandboxing/QA instancing into this perspective which of course makes it a bit trickier but this Customer is not so large so they can, at least for the time being, do their configuring directly in the system. It is always a matter of weighing the costs against the benifits.
However, we suddenly ran into a problem when we couldn’t run “Publish All” any more. It just showed a dialog with a cryptic message mentioning object with id  missing.
My first thought was that this must be in relation to one specific entity so I started trying to publish one entity at a time (starting with the ones we have changed a lot) and I quite quickly noticed that I got an error when trying to publish Opportunity but not other entities.
I then created a new solution, added Opportunity to this and included all dependencies, and made sure to publish all dependencies Before trying to publish Opportunity, just to make sure that there wasn’t some error in CRM:s causality of publishing. After doing this, I finally go an error message which said something useful, it said that a saved Query of a specifc GUID was missing. This probably meant that this Query was being used on a form in a subgrid and had been removed and when trying to publish, it would not, as the view did not exist.
I opened the form, went through all the subgrids and made sure that the selected view was an existing selection, saved and published the form and it worked. After this publish all also worked.
So the general conclusion is that you should be careful when deleting views as these might be used in subgrids, and the second conclusion is that Microsoft hopefuly will add a dependency blocker that disallows the deletion of a view that is being used in a subgrid.
MVP, CEO and owner at CRM-konsulterna AB