CRM 2011 - 选择通过 javascript 显示的功能区

发布于 2024-12-25 08:47:42 字数 150 浏览 4 评论 0原文

如何选择特定的丝带进行展示?

我在整个页面上插入了一个 Silverlight Web 资源,我想为其显示某个实体的功能区。

我想可以通过从 XRM 库调用一些 javascript 来做到这一点吗?但直到现在我还没有发现任何东西。

谢谢

How to pick a certain ribbon to show?

I have a Silverlight webresource inserted across the whole page and I want to show a ribbon of certain entity for it.

I suppose it's possible to do it by calling some javascript from XRM library? But I didn't find anything till now.

Thank you

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

姜生凉生 2025-01-01 08:47:42

你可能会反过来思考这个问题。您不使用 JavaScript 来选择要显示的功能区。您可以在任何可以显示的位置设置功能区(使用 RibbonDiffXml< /a>),然后使用 EnableRules 和 DisplayRules 来控制其显示位置。启用规则允许您指定 Web 资源并使用 JavaScript 来控制按钮是否启用。不幸的是,CRM 不允许您使用 JavaScript 来控制它是否显示(祈祷将来的可用性)。

那里有很多例子。这是一个< /a> 和 两个< /a> 我刚刚用谷歌搜索。请务必参考 SDK 的所有规则。最后,如果您想快速学习一些架构,可以使用可视化功能区编辑器工具。

请注意,您可以将功能区自定义指定到特定实体(在其 RibbonDiffXml 子节点中)或在全局范围内(导出功能区客户端扩展),并在 Id 字段中使用 {!EntityLogicalname},以便 CRM 将为该实体生成唯一 ID每个实体的节点,当它“扩展”定义时。

You might be thinking about this backwards. You don't use JavaScript to pick ribbon to show. You set up ribbon anywhere it could show (using RibbonDiffXml) and then EnableRules and DisplayRules to control where it shows. Enable Rules allow you to specify web resources and use JavaScript to control whether the button is enabled. Unfortunately, CRM won't allow you to use JavaScript to control whether it displays (fingers crossed for future availability).

There are lots of examples out there. Here is one and two I just googled up. Be sure to reference the SDK for all the rules. Finally, if you want to short-cut learning some of the schema, you can use the Visual Ribbon Editor tool.

Note that you can either specify your ribbon customizations to a particular entity (in its RibbonDiffXml subnode) or in the global scope (exporting Ribbon Client Extensions) and use the {!EntityLogicalname} in the Id fields so CRM will generate a unique ID for the node, per entity, when it 'expands' the definition.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文