zoukankan      html  css  js  c++  java
  • CRM lookup筛选

    function Loadcouse() {
    var type;
    var id;
    retrieveRecord(Xrm.Page.getAttribute("ownerid").getValue()[0].id, "SystemUserSet", function (data, textStatus, XmlHttpRequest) {
    if (data.BusinessUnitId.Id != null) {
    retrieveRecord(data.BusinessUnitId.Id, "BusinessUnitSet", function (data1, textStatus, XmlHttpRequest) {
    if (data1.new_city.Id != null) {
    retrieveRecord(data1.new_city.Id, "new_citySet", function (data2, textStatus, XmlHttpRequest) {
    type = data2.new_citytype.Value;
    id = data1.new_city.Id;

    Xrm.Page.getControl("new_coursename").addPreSearch(function () {
    var fetchxml;
    if (type = 100000001) {
    方法一使用fetch: fetchxml = "<filter type='and'>" +
    "<condition attribute='new_city' operator='in'>" +
    "<value uiname='全国' uitype='new_city'>{DD499663-C15D-E411-80DC-000C2957EC4F}</value>" +
    "<value uiname='TMM城市' uitype='new_city'>{A13A532E-03E8-E411-80F2-000C2957EC4F}</value>" +
    "<value uitype='new_city'>"+id+"</value>" +
    "</condition>" +
    "</filter>"
    }
    else if (type = 100000000) {
    fetchxml = "<filter type='and'>" +
    "<condition attribute='new_city' operator='in'>" +
    "<value uiname='全国' uitype='new_city'>{DD499663-C15D-E411-80DC-000C2957EC4F}</value>" +
    "<value uiname='戴耐德城市' uitype='new_city'>{FD6103AD-03E8-E411-80F2-000C2957EC4F}</value>" +
    "<value uitype='new_city'>" + id + "</value>" +
    "</condition>" +
    "</filter>"
    }
    Xrm.Page.getControl("new_coursename").addCustomFilter(fetchxml);
    });
    });
    }
    });
    }
    });
    }

  • 相关阅读:
    html Table实现表头固定
    Asp.net ORA-12154: TNS: 无法解析指定的连接标识符
    VS加载项目时报错 尚未配置为Web项目XXXX指定的本地IIS
    Sqlserver 导出insert插入语句
    RRAS
    MVC实例应用模式
    MVC概述
    23种设计模式
    XXX系统质量属性
    大型网站架构读后感
  • 原文地址:https://www.cnblogs.com/jayblog/p/9318376.html
Copyright © 2011-2022 走看看