简体   繁体   English

如何在托管解决方案中解决CRM 2011多对多关系中的错误?

[英]How to fix errors in a CRM 2011 many-to-many relation in a managed solution?

I made a mistake in a many-to-many relation. 我在多对多关系中犯了一个错误。 I made it point to the wrong entity due to bad naming. 由于命名错误,我指出了错误的实体。

How can I correct this relation when it's already imported as an unmanaged solution? 当已经将其作为非托管解决方案导入时,如何纠正该关系?

A many-to-many relation seems to be fixed forever when it's imported from an unmanaged solution. 从非托管解决方案中导入多对多关系似乎永远是固定的。 All my changes are ignored in every import. 我的所有更改在每次导入时都会被忽略。 For now, my workaround has been to create a relation with a new name, but then I have to update and deploy my plugins and other clients as well. 目前,我的解决方法是使用新名称创建关系,但是随后我还必须更新和部署我的插件和其他客户端。

Importing a managed or unmanaged solution will won't delete anything from the target system. 导入托管或非托管解决方案将不会从目标系统中删除任何内容。 Solutions are additive. 溶液是添加剂。

I would suggest either, deleting the relationship manually on the target systems, or marking it as redundant (in the description or name) as you would with a publically released API. 我建议要么在目标系统上手动删除关系,要么将其标记为冗余(在描述或名称中),就像使用公开发布的API一样。

I have learned that this is a shortcoming in CRM 2011. One workaround is to: 我了解到这是CRM 2011中的一个缺点。一种解决方法是:

  1. Correct the relation in the source organization 纠正源组织中的关系
  2. Export the corrected solution and unzip 导出更正的解决方案并解压缩
  3. Change the unique solution name and zip to a new file. 更改唯一的解决方案名称,并压缩到新文件。 This will be the holding solution 这将是控股解决方案
  4. Import the holding solution into the target system 将保留解决方案导入目标系统
  5. Uninstall the erroneous solution from the target system 从目标系统上卸载错误的解决方案
  6. Import the corrected solution into the target system 将更正的解决方案导入目标系统
  7. And, finally, uninstall the holding solution 最后,卸载保留解决方案

This works, because nothing in CRM is deleted if it's referenced from a solution. 这是可行的,因为如果从解决方案中引用,则CRM中的任何内容都不会删除。 In this case, the bogus reference is the only thing not referenced, hence it should be the only thing deleted. 在这种情况下,伪引用是唯一未引用的内容,因此它应该是唯一被删除的内容。

The holding solution is there just to reference all the valid pieces we don't want to delete. 保留解决方案仅用于引用我们不想删除的所有有效片段。

I haven't gotten around to test it myself, but I trust the individual who informed me of this workaround. 我尚未亲自对其进行测试,但我相信向我通知此解决方法的个人。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM