Quantcast
Channel: Super Feed from MSCRM Technical Insight by Jonathan Nachman
Viewing all articles
Browse latest Browse all 130

CRM 4.0 Error - nullReferenceException when publishing/exporting entity

$
0
0

Unfortunately the trace file wasn't very helpful (below)

>MSCRM Error Report:
--------------------------------------------------------------------------------------------------------
Error: Exception has been thrown by the target of an invocation.
Error Message: Exception has been thrown by the target of an invocation.
Source File: Not available
Line Number: Not available
Request URL: http://servername:5555/organisationname/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.PublishLatest(Int32 objectTypeCode, ExecutionContext context)
at Microsoft.Crm.Tools.ImportExportPublish.FormPublisher.SetInProduction(EntityMetadata entity)
at Microsoft.Crm.Tools.ImportExportPublish.FormPublisher.PublishForms(Hashtable entitiesTable)

However it did leave clues on where i should be looking, The error is occuring when the LabelLoader is trying to fire. This meant that there is a null error when it is trying to load the label on the field.
This led me to look at the attributes and see if there was anything that didnt look right. I noticed that a field name xxx_bob was displaying on the field, however the attribute was not listed.
The problem was solved by re-adding the attribute and then publishing the customisations (which was successful).
Enjoy
Jonathan


Viewing all articles
Browse latest Browse all 130

Trending Articles