If you see the following error in the CRM trace/log file (as I did today on a VPC… for no apparent reason):
Stack Trace Info: [NullReferenceException: Object reference not set to an instance of an object.]
at Microsoft.Crm.ObjectModel.OrganizationUIService.LabelLoaderPublished.LoadMetadataLabel(Int32 entityType, String attributeName, ExecutionContext context)
The problem might be that there’s an old attribute being referenced in the entity’s form. To determine this and remove the bad form
Of course, any direct change to the CRM database is not supported by Microsoft and should only be done as a last resort. Since I was working on a non-production VPC I went ahead and made the change... and it did the trick. Again, I have no idea how the problem occurred. The problem entity was fine the last time I loaded the VPC and today I couldn't publish, remove attributes, or export. Strange, very strange.
-Tim
I had this exact same error on a preproduction system and came across your post after basically a day of troubleshooting. Thanks alot. One note is that there's a less tedious way to change this than editing the database. Open up the entity form and make an insignificant change (change a random label). Then save and you should be able to publish. That way you aren't going off into unsupported land.
ReplyDelete