简体   繁体   English

CRM 2011:对托管解决方案表格的非托管更改

[英]Crm 2011: Unmanaged changes to managed solution form gotcha

I am learning a lot about managed vs. unmanaged solutions these days, and I definately see a lot of benefits using managed solutions in production. 如今,我正在学习有关托管解决方案和非托管解决方案的很多知识,并且我肯定会看到在生产中使用托管解决方案有很多好处。

I see that the recommended pattern is to have a development environment where you work with unmanaged solutions, exporting both unmanaged and managed versions of the solution, and finally deploying the managed solution to production (and possibly to a staging environment first for testing). 我看到推荐的模式是拥有一个开发环境,在该环境中您可以使用非托管解决方案,导出该解决方案的非托管和托管版本,最后将托管解决方案部署到生产环境(可能首先部署到暂存环境以进行测试)。

This is all very nice and clean, but not without pitfalls. 这一切都非常好而且干净,但并非没有陷阱。 I recently experienced the following scenario: 我最近遇到以下情况:

1. 1。

We used the above pattern to create and deploy a managed solution for the account entity and install it for a customer. 我们使用上述模式为帐户实体创建和部署托管解决方案,并为客户安装该解决方案。 The solution contained among other things a form and some other stuff for integration with a legacy system 该解决方案除其他外,还包含用于与遗留系统集成的表单和其他一些内容。

Sketch: 草图:

Managed section 托管部分


Field A Field B 领域A领域B

Field C Field D 场C场D

2. 2。

Without my knowledge, the customer went ahead and customized the account form using the 'customize' menu. 在我不知情的情况下,客户继续使用“自定义”菜单自定义帐户表单。 What he did, was to create a new form section, and move some of the custom fields included in our managed solution from the original section to the new section 他所做的就是创建一个新的表单部分,并将托管解决方案中包含的一些自定义字段从原始部分移到新部分。

Sketch: 草图:

Unmanaged section 非托管部分


Field A Field B 领域A领域B

Managed section 托管部分


Field C Field D 场C场D

3. 3。

Since this is an unmanaged change, it takes priority over my managed changes, wrecking havoc to the form layout afer I did some other changes (deleting some other fields and changing the order of some fields on the form) 由于这是一个非托管更改,因此它比我的托管更改具有更高的优先级,在我进行了其他更改(删除其他字段并更改窗体上某些字段的顺序)之后,对表单布局造成了严重破坏

Resolution attempts: 解决尝试:

I have tried re-installing the solution of course, also with the 'overwrite customizations' option that promises to overwrite unmanaged customizations to the entity, but that does not change anything. 我当然尝试过使用“覆盖自定义”选项重新安装该解决方案,该选项承诺将非托管自定义覆盖到实体,但不会改变任何内容。

I also tried removing the new section and the fields that were moved as an unmanaged customization (using the customize menu) and then reinstalling the managed solution, hoping that this would somehow 'undo' the unmanaged change and that the diff mechanism would detect that the fields in question were only present in the managed solution and that this would cause them to appear in the original location. 我还尝试了删除新部分和作为非托管自定义项移动的字段(使用定制菜单),然后重新安装托管解决方案,希望这将以某种方式“撤消”非托管更改,并且差异机制将检测到有问题的字段仅出现在托管解决方案中,这将导致它们出现在原始位置。 But as it turned out, it seemes like I was only carving more changes in stone - this time telling the system to remove the fields from the form altogether. 但是事实证明,似乎我只是在用石头雕刻更多的变化-这次告诉系统将字段完全从表单中删除。

Can it really be like this, that once you do unmanaged changes to a form, your managed form is just screwed? 真的可以这样吗,一旦您对表单进行非托管更改,托管表单就被搞砸了?

Is there no way to force the managed form take priority again? 没有办法强制托管表单再次获得优先权吗?

I can of course do some more unmanaged customizations to the form to put the fields back where they originally were, but that would just postpone the problem until next time I want to eg change the order of fields in the managed form - the unmanaged changes from last time still have priority. 我当然可以对表单进行更多非托管的自定义,以将字段放回原来的位置,但这只会将问题推迟到下一次我想更改托管表单中字段的顺序时,例如-上次仍然有优先权。

It seems that my only options are either to start from scratch again, or to switch to an unmanaged regime for the account entity. 看来,我唯一的选择要么是重新开始,要么切换到帐户实体的不受管机制。

Lessons learned: 得到教训:

If this is as bad as it seems to be, I should probably have used managed properties to disallow customizations to the forms in my managed solution. 如果这看起来很糟糕,我可能应该使用托管属性来禁止对托管解决方案中的表单进行自定义。 If this was a custom entity I would have done so, but I thought this would be a bit strict for an entity like the account entity. 如果这是一个自定义实体,我会这样做,但是我认为这对于诸如帐户实体之类的实体会有些严格。 Another lesson learned is probably to never give the customer sysadmin/customizer rights... 吸取的另一个教训可能是永远不要授予客户sysadmin / customizer权限...

Would love some other thoughts and experiences regarding this. 会喜欢其他一些想法和经验。

I know I'm late to the party here, but for what its worth and for anyone that comes across this post I'll add my two cents. 我知道我在这里参加聚会迟到了,但是对于它的价值以及对于本帖子中遇到的任何人,我将加我的两美分。 we have a setup almost exactly as @TMan mentioned, except that we have a Dev, QA, and production site where Dev is unmanaged and the source of our customizations and QA and production are both managed. 我们拥有与@TMan几乎完全相同的设置,除了我们有一个Dev,QA和生产站点之外,该站点不受Dev的管理,我们的自定义源以及QA和生产均得到管理。 I've spent far more time than I would have liked to with the solutions and customization layering processes to understand how everything comes together to get the final result. 与解决方案和自定义分层过程相比,我花费了比我想要的时间更多的时间,以了解如何将所有东西结合在一起以获得最终结果。 I've also added third-party managed solutions into the mix. 我还添加了第三方托管解决方案。 Seeing the end result of all that, I have come to the conclusion that managed solutions are absolutely NOT the way to go, except maybe for a third-party solution provider, but the target systems IMHO should all be customized with unmanaged changes. 看到所有这些的最终结果,我得出的结论是,除了第三方解决方案提供商之外,托管解决方案绝对不是走的路,但是目标系统恕我直言应该全部使用非托管更改进行定制。 One major issue I found was when I brought third-party managed solutions into our Dev environment, we will have dependencies to components in that solution once we export our own customizations as a managed solution to deploy to QA and production. 我发现的一个主要问题是,当我将第三方托管解决方案引入我们的开发环境时,一旦我们导出自己的自定义内容作为托管解决方案以部署到质量保证和生产中,我们将对该解决方案中的组件产生依赖性。 The interesting thing with this is that the layering and dependencies on the Dev site are flipped around in reverse order once you go to a QA or production managed site because your own customizations go from unmanaged to managed, and managed customizations are applied in order of install date in the system. 有趣的是,一旦您进入质量检查或生产托管站点,开发站点上的分层和依赖关系将以相反的顺序翻转,因为您自己的自定义项从非托管变为托管,并且托管定制项按安装顺序应用系统中的日期。 Without getting into a lot more detail here, the summary is these dependencies will never go away once introduced into one of those managed environments and you can't uninstall your own customizations unless you want data loss, and in some cases you might not be able to uninstall the solution even if you were ok with data loss due to the dependencies. 在此无需赘述,摘要是,一旦将这些依赖项引入了这些托管环境之一,这些依赖就永远不会消失,除非您要丢失数据,否则您将无法卸载自己的自定义项,在某些情况下,您可能无法卸载解决方案,即使由于依赖关系而导致数据丢失也可以。 All our environments are CRM Online so we don't have the option of mucking around in the database directly to get rid of stuff we don't want. 我们所有的环境都是CRM Online,因此我们没有选择直接在数据库中随意处理来摆脱不需要的内容。 The key here is to know that in most cases once you put a managed solution in place it is forever, permanently there and you can only apply additional unmanaged changes on top of what is there, you will have no way to clean up unused or unwanted components. 这里的关键是要知道,在大多数情况下,一旦将托管解决方案永久地就位,并且只能在其之上应用其他非托管更改,则将无法清理未使用或不需要的更改组件。 I spent a lot of time doing my own research and testing and also spent a lot of time on the phone with Microsoft. 我花了很多时间进行自己的研究和测试,还花了很多时间与Microsoft通话。

Bottom line: managed solutions for a multi-site setup such as Dev to QA and/or production is a very bad way to go, you're losing flexibility and could possibly hit a brick wall in some situations. 底线:针对多站点设置的托管解决方案(例如,开发质量保证和/或生产的方法)是非常糟糕的方法,您失去了灵活性,在某些情况下可能会碰壁。 You're much better off keeping everything unmanaged and having the flexibility you would expect to properly customize your systems 您最好保持所有内容不受管理,并具有可以正确自定义系统的灵活性

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

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