• 20100518日做的订单存根


    if(IsNull(crmForm.all.new_nsrsbh)==false){
    //获取纳税人识别号
    var nsrsbh = crmForm.all.new_nsrsbh.DataValue;
    
    var xml = "" + 
    "<?xml version=\"1.0\" encoding=\"utf-8\"?>" + 
    "<soap:Envelope xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\">" + 
    GenerateAuthenticationHeader() + 
    "  <soap:Body>" + 
    "    <RetrieveMultiple xmlns=\"http://schemas.microsoft.com/crm/2007/WebServices\">" + 
    "      <query xmlns:q1=\"http://schemas.microsoft.com/crm/2006/Query\" xsi:type=\"q1:QueryExpression\">" + 
    "        <q1:EntityName>account</q1:EntityName>" + 
    "        <q1:ColumnSet xsi:type=\"q1:AllColumns\" />" + 
    "        <q1:Distinct>false</q1:Distinct>" + 
    "        <q1:Criteria>" + 
    "          <q1:FilterOperator>And</q1:FilterOperator>" + 
    "          <q1:Conditions>" + 
    "            <q1:Condition>" + 
    "              <q1:AttributeName>new_nsrsbh</q1:AttributeName>" + 
    "              <q1:Operator>Equal</q1:Operator>" + 
    "              <q1:Values>" + 
    "                <q1:Value xsi:type=\"xsd:string\">"+nsrsbh+"</q1:Value>" + 
    "              </q1:Values>" + 
    "            </q1:Condition>" + 
    "          </q1:Conditions>" + 
    "        </q1:Criteria>" + 
    "      </query>" + 
    "    </RetrieveMultiple>" + 
    "  </soap:Body>" + 
    "</soap:Envelope>" + 
    "";
    
    var xmlHttpRequest = new ActiveXObject("Msxml2.XMLHTTP");
    
    xmlHttpRequest.Open("POST", "/mscrmservices/2007/CrmService.asmx", false);
    xmlHttpRequest.setRequestHeader("SOAPAction","http://schemas.microsoft.com/crm/2007/WebServices/RetrieveMultiple");
    xmlHttpRequest.setRequestHeader("Content-Type", "text/xml; charset=utf-8");
    xmlHttpRequest.setRequestHeader("Content-Length", xml.length);
    xmlHttpRequest.send(xml);
    
    try{
    var resultXml = xmlHttpRequest.responseXML;
    
    //企业名称
    var nsrmc = resultXml.getElementsByTagName("q1:name")[0].childNodes[0].nodeValue;
    
    var lookupData = new Array();
    // Create an object to add to the array.
       var lookupItem= new Object();
    // Set the id, typename, and name properties to the object.
         lookupItem.typename = 'account';
         lookupItem.name =nsrmc 
    // Add the object to the array.
       lookupData[0] = lookupItem;
    
    
    // Set the value of the lookup field to the value of the array.
       crmForm.all.customerid.DataValue = lookupData;
       crmForm.all.name.DataValue=nsrmc+"产品报订单";
    crmForm.all.customerid.disabled=true;
    crmForm.all.new_nsrsbh.disabled=true;
    }
    catch(Exception ){
     alert('纳税人信息查询不到');
    crmForm.all.new_nsrsbh.DataValue="";
    
     return;
    }
    
    
    
    
    }
    else{
     return;
    }
    
  • 相关阅读:
    weixueyuanNginx日志管理与监控8
    w3cschoolNetty 实战精髓篇2
    weixueyuanNginx集群9
    Java IO之 Netty与NIO服务器NIO中的零拷贝
    weixueyuanNginx在Kubernetes10
    CString内容转为16进制unsigned char
    为 Windows 驱动编译静态 lib 库
    makefile编译静态库或动态库,遍历所有源文件
    线程安全
    三十六、Promise
  • 原文地址:https://www.cnblogs.com/hellohongfu/p/1739412.html
Copyright © 2020-2023  润新知