[英]Tweak CRM Sitemap to have different URL navigations for different environments
We want to have different Sitemap subarea Url, so that the Sitemap can be independent of environments & worryfree when we refresh the environments from higher region to lower.我们希望有不同的Sitemap子区域Url,这样Sitemap就可以独立于环境,从高到低刷新环境时无忧无虑。 Even deployments can be error free & can avoid manual step in post deployment activity.
甚至部署也可以是无错误的,并且可以避免部署后活动中的手动步骤。
Dev:开发:
<SubArea Id="nav_hub" ResourceId="Hub_SubArea_Title" DescriptionResourceId="Hub_SubArea_Description"
ToolTipResourseId="Hub_SubArea_ToolTip" Icon="/_imgs/Hub_32.png"
Url="http://mydevhub.com/home.aspx" AvailableOffline="false" />
UAT: UAT:
<SubArea Id="nav_hub" ResourceId="Hub_SubArea_Title" DescriptionResourceId="Hub_SubArea_Description"
ToolTipResourseId="Hub_SubArea_ToolTip" Icon="/_imgs/Hub_32.png"
Url="http://myuathub.com/home.aspx" AvailableOffline="false" />
Any idea to do that?有什么想法可以这样做吗?
I ended up doing this workaround as we cannot pass dynamic variable url to Sitemap.我最终做了这个解决方法,因为我们无法将动态变量 url 传递给站点地图。
1.Created a Sub-Area with url to custom HTML web resource as below: 1.创建一个带有url到自定义HTML网络资源的子区域,如下所示:
$webresource:pub/Scripts/External/navigation.html
2.Just used the below content to open a new window based on org url: 2.刚刚使用以下内容基于org url打开一个新窗口:
<html><head>
<script src="../../../ClientGlobalContext.js.aspx" type="text/javascript"></script>
<script language="javascript">
var crmUrl = parent.Xrm.Page.context.getClientUrl();
if (crmUrl.indexOf('devinstance.crm.dynamics.com') > 0)
parent.window.open('http://mydevhub.com/home.aspx');
if (crmUrl.indexOf('uatinstance.crm.dynamics.com') > 0)
parent.window.open('http://myuathub.com/home.aspx');
</script>
</head><body>
</body></html>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.