Dynamics crm 2011 RibbonWorkbench中查找字段的值规则

Dynamics crm 2011 RibbonWorkbench中查找字段的值规则,dynamics-crm-2011,ribbon-button,Dynamics Crm 2011,Ribbon Button,我想根据查找字段的值向自定义功能区按钮添加显示规则,无论该字段是否为空。我该怎么检查呢。下面的代码不起作用。我将值指定为0“”,但它仍然不起作用。请给出一些解决方案。 谢谢 使用启用规则,因为它提供了编写一些JavaScript函数的工具 //Check if the field value is null or not? ' //in my case the field I am checking for null value is ifx_lookupid. function Displa

我想根据查找字段的值向自定义功能区按钮添加显示规则,无论该字段是否为空。我该怎么检查呢。下面的代码不起作用。我将值指定为0“”,但它仍然不起作用。请给出一些解决方案。 谢谢


使用启用规则,因为它提供了编写一些JavaScript函数的工具

//Check if the field value is null or not? '
//in my case the field I am checking for null value is ifx_lookupid.

function DisplayRule_IfField_IsNull()
{
    var regardingField = Xrm.Page.getAttribute("ifx_lookupid");
    if (regardingField != undefined && regardingField != null) {
        return true;
        }
        else {
            return false;
        }
    }
}
希望这会有所帮助

//Check if the field value is null or not? '
//in my case the field I am checking for null value is ifx_lookupid.

function DisplayRule_IfField_IsNull()
{
    var regardingField = Xrm.Page.getAttribute("ifx_lookupid");
    if (regardingField != undefined && regardingField != null) {
        return true;
        }
        else {
            return false;
        }
    }
}