Recently, I came across a very odd issue in CRM 4.0. This issue popped up because of an improper deploy/refresh in conjunction with the removal of an entity between test and production servers. It was very out of the ordinary, and I had not seen anything like it before.
The Issue at Hand
This issue was that we were unable to publish the Appointment entity. We were able to publish all of the other entities, but trying to publish the Appointment alone would fail. We could import previous versions of the entity, but all of them had the same effect. This is a critical issue because if you are unable to publish an entity, then you can no longer modify that entity.
So this is when I started to dig around. I first noticed that where was a blank lookup field on…