我正在尝试发布从其他租户导入的帐户实体,并在跟踪日志中收到以下消息:
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://crm1.blablabl.com/tenant/AppWebServices/SystemCustomization.asmx Stack Trace Info: [NullReferenceException: Object reference not set to an instance of an object.] at Microsoft.Crm.ObjectModel.OrganizationUIService.LabelLoaderAllLanguages.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.RetrieveMultipleWithAllLanguages(EntityExpression entityExpression, ExecutionContext context) at Microsoft.Crm.Metadata.OrganizationUIHelper.RetrieveInProductionHelper(Int32 objectTypeCode, ExecutionContext context) at Microsoft.Crm.Metadata.UsageHelper.CheckForms(Guid attributeId, DynamicMetadataCache mdCache, ExecutionContext context) at Microsoft.Crm.Metadata.UsageHelper.GetAttributeUsageInfo(Guid attributeId, Guid relationshipId, DynamicMetadataCache mdCache, ExecutionContext context) at Microsoft.Crm.Metadata.UsageHelper.GetEntityUsageInfo(Guid entityId, DynamicMetadataCache mdCache, ExecutionContext context) at Microsoft.Crm.Metadata.EntityService.GetUsageInfo(Guid entityId, ExecutionContext context) at Microsoft.Crm.Metadata.EntityService.GetUsageInfo(Guid entityId) at Microsoft.Crm.Application.WebServices.SystemCustomization.EntityDelete.Execute(IUser user, Guid entityId) at Microsoft.Crm.Application.WebServices.SystemCustomization.SystemCustomization.DeleteEntity(Guid entityId)
答案 0 :(得分:3)
找出我自己的解决方案:
帐户代码的实体类型为1 - 因此,如果您在CRM数据库上运行以下查询:
SELECT * FROM [MYTENANT_MSCRM].[dbo].[OrganizationUIBase] where [ObjectTypeCode] = 1
您应该看到2行代表已发布和未发布的表单定义。
这些表单存在问题(是的,发布的表单可能存在问题,这会阻止您发布有效的新表单)。您需要做的是查看以下每行中的FormXml
字段:
您也可以尝试消除过程。一次删除一个单元格,使用相同的FormXML
更新BOTH记录,然后尝试再次发布。
可能需要一些时间,但这可以解决您的问题。