无法删除自定义实体,而不是关系

时间:2017-08-08 06:57:48

标签: dynamics-crm dynamics-crm-2016

我创建了一个新的实体,它没有任何额外的字段或关系,也没有任何记录 在我创建实体之后,当我尝试删除它时,它会给我以下错误:

An error has occurred.

在日志文件中,可以从错误对话框中下载:

System.ArgumentNullException: Value cannot be null. Parameter name: collection

启用跟踪错误时:

Process: w3wp |Organization:0220cef0-4f09-e711-80d8-000c2950db72 |Thread:  244 |Category: Platform.Metadata |User: 00000000-0000-0000-0000-000000000000 |Level: Error |ReqId: 17d8623e-7539-48af-9652-b8550acfb76f | EntityService.Delete  ilOffset = 0x1A8
>EntityService.Update caught exception: System.ArgumentNullException: Value cannot be null.
Parameter name: collection
   at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
   at Microsoft.Crm.BusinessEntities.CascadeEngine.LogRecordSetCount(Int32 count, IEnumerable`1 entityIds, Int32 parentEntityObjectTypeCode, String perfCounterName)
   at Microsoft.Crm.BusinessEntities.CascadeEngine.CascadeDeleteDB(IEnumerable`1 parentEntityIds, Int32 parentEntityObjectTypeCode, ExecutionContext context)
   at Microsoft.Crm.BusinessEntities.CascadeEngine.Delete(IEnumerable`1 entityIds, Int32 entityObjectTypeCode, ExecutionContext context)
   at Microsoft.Crm.BusinessEntities.CascadeEngine.DeleteAll(Int32 entityObjectTypeCode, ExecutionContext context)
   at Microsoft.Crm.Metadata.EntityService.Delete(Guid entityId, MetadataHelper metadataHelper, Boolean suppressSecurityCacheFlush, ExecutionContext context)

我不知道什么是错的。如果你知道的话请告诉我。感谢。

2 个答案:

答案 0 :(得分:0)

要检查的一件事是,是否存在任何依赖关系,您可以通过在解决方案中选择实体并单击“显示依赖关系”来执行此操作:

enter image description here

答案 1 :(得分:0)

我确实注意到这个错误只在安装了波斯语语言包时发生,但是当它只是没有语言包的CRM时,一切都很好。
所以至少我知道现在要做什么,这里没有进一步讨论的东西 感谢。