如何删除Dynamics CRM网站地图自定义项? [英] How do I remove Dynamics CRM sitemap customizations?

查看:244
本文介绍了如何删除Dynamics CRM网站地图自定义项?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个托管插件,可以从Microsoft Dynamics CRM安装/卸载.
在插件的customisations.xml中,我包括了一小部分Sitemap定制,尤其是一个附加组,并添加到了sidenav区域.

I've got a managed plugin that I can install / uninstall from Microsoft Dynamics CRM.
Within the plugin's customizations.xml I have included a small section of Sitemap customizations, particularly an additional group and added to the sidenav area.

但是,我遇到的问题是,在卸载插件时,不会删除站点地图自定义项.额外的组仍然是sidenav区域的一部分,尽管现在这会导致站点地图错误,因为它使用的必需的Web资源丢失了(它们在插件卸载期间被删除了).

The issue that I'm running into, however, is that the sitemap customizations do not get removed when I uninstall the plugin. The additional group remains as part of the sidenav area, though now it causes sitemap errors because the necessary webresources it uses are missing (they are removed during the plugin uninstall).

当我卸载插件时,是否有任何方法可以强制站点地图恢复为默认设置,或者可能将自定义标记为特定于插件,以便在卸载时将其删除?

Are there any ways to force the sitemap to revert to default when I uninstall the plugin or possibly mark the customizations as specific to the plugin so they are removed on uninstall?

推荐答案

实际上,根据CRM 2011 SDK文档,当删除托管解决方案时,站点地图修改是托管解决方案的一部分,应自动从系统中删除.引用自SDK文档:

Actually, according to the CRM 2011 SDK documentation the sitemap modification thas was part of the managed solution should automatically be removed from the system when the managed solution is removed. Quoted from the SDK doc:

将解决方案打包为托管解决方案时,将比较SiteMap XML 原始SiteMap XML以及对 SiteMap.托管解决方案中仅包括差异. 这些差异包括已更改,移动,添加或更改的项目 删除....以后,如果托管解决方案已卸载,则 与托管解决方案一起导入的SiteMap XML将是 引用以删除该托管对象引入的更改 解决方案.然后,将计算一个新的活动SiteMap.

When a solution is packaged as managed, the SiteMap XML is compared to the original SiteMap XML and any other customizations made to the SiteMap. Only the differences are included in the managed solution. These differences include items that are changed, moved, added or removed .... Later, if the managed solution is uninstalled, the SiteMap XML that was imported with the managed solution will be referenced to remove the changes introduced with that managed solution. A new active SiteMap is then calculated.

例如,仅包含添加的组的解决方案的customization.xml将包含类似于以下内容的XML:

For example, the customization.xml of a solution containing just an added Group will contain XML similar to this:

<Group Id="TestGroup" IsProfile="0" ordinalvalue="6" solutionaction="Added">
          <Titles>
            <Title Title="Examplegroup" LCID="1033" />
          </Titles>
          <SubArea Id="new_webresource" PassParams="1" Url="$webresource:new_webresource" ordinalvalue="0">
            <Titles>
              <Title LCID="1033" Title="Example" />
            </Titles>
          </SubArea>
        </Group>

solutionaction属性指示系统在删除托管解决方案时从完整的customization.xml中删除XML片段.简而言之,它按照您希望的方式运行...

The solutionaction attribute instructs the system to remove the snippet of XML from the full customization.xml when the managed solution is removed. In short, it should behave the way that you want it to...

当然,以上内容仅适用于托管解决方案.

Of course, the above only applies to managed solutions.

这对您不起作用,似乎表明您的系统的customization.xml某种程度上已损坏.我建议导出站点地图,删除对错误元素的所有引用,然后重新导入.

That is doesn't work for you seems to indicate that the customization.xml of your system has somehow been corrupted. I would recommend exporting the sitemap, remove any reference to the erroneous elements, and re-import.

还应注意,通常需要在发布站点地图更新后对Web浏览器进行硬刷新,以使删除的导航元素消失.否则,很容易遇到与您描述的问题类似的问题.

It should also be noted that you usually need to do a hard refresh of the web browser after publishing an update to the sitemap, in order for the removed navigation elements to go away. Otherwise it's easy to run into problems similar to the ones that you describe.

这篇关于如何删除Dynamics CRM网站地图自定义项?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆