Answered by:
CRM 4.0 Object reference not set to an instance of an object. When publishing and/or deleting.

Question
-
When trying to publish, we recieve the standard error message. After setting up the trace, we recieve the following.
>MSCRM Error Report:
--------------------------------------------------------------------------------------------------------
Error: Object reference not set to an instance of an object.Error Message: Object reference not set to an instance of an object.
Source File: Not available
Line Number: Not available
Request URL: http://leristest.gdcii.com/FAA/AppWebServices/SystemCustomization.asmx
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)
at Microsoft.Crm.ObjectModel.OrganizationUIService.LabelLoader.LoadCellLabel(Guid cellObjectId, String cellObjectColumnName, Int32 objectType, String attributeName, ExecutionContext context)
at Microsoft.Crm.ObjectModel.OrganizationUIService.InsertFormLabels(IBusinessEntity entity, ILabelLoader labelLoader, ExecutionContext context)
at Microsoft.Crm.ObjectModel.OrganizationUIService.Retrieve(BusinessEntityMoniker moniker, EntityExpression entityExpression, ExecutionContext context)
at Microsoft.Crm.ObjectModel.OrganizationUIService.GetIdsOfDeletedNodes(List`1 objectIds, String newFormXml, BusinessEntityMoniker moniker, ExecutionContext context)
at Microsoft.Crm.ObjectModel.OrganizationUIService.PublishFormLabels(IBusinessEntity entity, ExecutionContext context)
at Microsoft.Crm.Metadata.OrganizationUIHelper.DeleteHelper(Int32 objectTypeCode, ExecutionContext context)
at Microsoft.Crm.Metadata.EntityService.DeleteUIData(Int32 objectTypeCode, ExecutionContext context)
at Microsoft.Crm.Metadata.EntityService.Delete(Guid entityId, ExecutionContext context)
at Microsoft.Crm.Metadata.EntityService.Delete(Guid entityId)
at Microsoft.Crm.Application.WebServices.SystemCustomization.EntityDelete.Execute(IUser user, Guid entityId)
at Microsoft.Crm.Application.WebServices.SystemCustomization.SystemCustomization.DeleteEntity(Guid entityId)
[2011-06-08 15:04:56.5] Process: w3wp |Organization:00000000-0000-0000-0000-000000000000 |Thread: 7(MSCRM:-NotificationManager.NotificationWatcherThreadProc) |Category: Exception |User: 00000000-0000-0000-0000-000000000000 |Level: Error | NotificationManager.NotificationWatcherThreadProc
at NotificationManager.NotificationWatcherThreadProc()
at ThreadHelper.ThreadStart_Context(Object state)
at ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at ThreadHelper.ThreadStart()
>ThreadAbort Exception in NotificationWatcherThreadProc Thread was being aborted.
[2011-06-08 15:04:56.6] Process: w3wp |Organization:00000000-0000-0000-0000-000000000000 |Thread: 7(MSCRM:-NotificationManager.NotificationWatcherThreadProc) |Category: Platform |User: 00000000-0000-0000-0000-000000000000 |Level: Error | ThreadHelper.ThreadStart_Context
at ThreadHelper.ThreadStart_Context(Object state)
at ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at ThreadHelper.ThreadStart()
>NotificationWatcherThreadProc Stopped.Reviewing the kb article, http://support.microsoft.com/kb/947096, I've corrected the offending attributes/relationships, however, I still can not publish the custom entity. Is there any way to get around this issue other than restoring from a backup? Is there a way to delete the entity and start fresh?
Thursday, June 9, 2011 12:44 PM
Answers
-
Hello,
Also you can check following article - http://blogs.infinite-x.net/2009/11/16/interesting-support-article-find-947096/
Microsoft CRM Freelancer
My blog (english)
Мой блог (русскоязычный)- Proposed as answer by VishalSwamiMicrosoft employee Friday, June 10, 2011 10:25 AM
- Marked as answer by mosbySE Monday, November 7, 2011 3:31 PM
Thursday, June 9, 2011 1:32 PMModerator -
I eventually imported all related entities including crm ootb entities. After import, confirmed all relationships and fields were available and published. Isn't it great CRM 2011 provides a list of related entities when you export.
Thanks.
- Marked as answer by mosbySE Monday, November 7, 2011 3:30 PM
Thursday, June 9, 2011 7:47 PM
All replies
-
Hello,
Also you can check following article - http://blogs.infinite-x.net/2009/11/16/interesting-support-article-find-947096/
Microsoft CRM Freelancer
My blog (english)
Мой блог (русскоязычный)- Proposed as answer by VishalSwamiMicrosoft employee Friday, June 10, 2011 10:25 AM
- Marked as answer by mosbySE Monday, November 7, 2011 3:31 PM
Thursday, June 9, 2011 1:32 PMModerator -
I eventually imported all related entities including crm ootb entities. After import, confirmed all relationships and fields were available and published. Isn't it great CRM 2011 provides a list of related entities when you export.
Thanks.
- Marked as answer by mosbySE Monday, November 7, 2011 3:30 PM
Thursday, June 9, 2011 7:47 PM -
hi,
check here http://msdynamics4you.blogspot.com/2009/07/cannot-deletepublish-changes-in.html
vishal swami
If this post answers your question, please click "Mark As Answer" on the post and "Mark as Helpful"
http://msdynamics4you.blogspot.comFriday, June 10, 2011 10:25 AM