隐藏功能区按钮Crm 2011 [英] Hide Ribbon Button Crm 2011

查看:64
本文介绍了隐藏功能区按钮Crm 2011的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当记录的所有者不是当前用户时,我必须隐藏功能区按钮。

I have to hide a ribbon button when the owner of the record isn't the current user.

我正在使用Visual Ribbon Editor for CRM 2011,但是我尚未找到解决方案。我尝试使用Field规则ValueRule,但它只允许我输入布尔值(1或0)。

I'm using Visual Ribbon Editor for CRM 2011 however I didn't find out the solution yet. I tried to use Field rule ValueRule but it just allows me to put a bool value (1 or 0).

有人可以告诉我如何做到这一点吗?

Can anyone please tell me how can I do that?

预先感谢您!

推荐答案

添加这样的启用规则:

<EnableRules>
    <EnableRule Id="YourEntity.Form.XXX.MainTab.XXXXXXXXXX.CustomRule" />
</EnableRules>

规则定义如下:

<RuleDefinitions>
    <TabDisplayRules />
        <DisplayRules />
        <EnableRules>
            <EnableRule Id="Email.Form.email.MainTab.XXXXXXXXXX.CustomRule">
                <CustomRule FunctionName="DisableButton" Library="$webresource:new_/js/xxx.js" InvertResult="true" />
            </EnableRule>
        </EnableRules>
</RuleDefinitions>

编写JavaScript函数 DisableButton 并返回根据您的情况为真或假。请参考CustomRule库中的 js 网络资源。

Write a JavaScript function DisableButton and to return true or false based on your condition. Reference the js webresource in CustomRule Library.

这篇关于隐藏功能区按钮Crm 2011的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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