4 Replies Latest reply on Jul 28, 2016 1:01 AM by RoH1

    RaiseError with SOAP.request


      Hi all,

      what I'm trying to do is to synchronize the value of some formular field to SharePoint list columns. I try to realize this by executing a SOAP.request.

      Actually my experience with JS is poor and I did also not really work with XML and SOAP before. Maybe someone can tell me what I'm doing wrong here.


      function SyncMetadata(){

          var webUrl = "https://website/_vti_bin/Lists.asmx?wsdl";

          var action = "http://schemas.microsoft.com/sharepoint/soap/UpdateListItems";

          var xmlmsg;

          var listname = "Orders";

          var anumber = this.getField("OrderID").value;


          var user = app.response({cLabel:"Username", cTitle:"Authentification"});

          var pwd = app.response({bPassword:true, cLabel:"Password", cTitle:"Authentification"});

          var auth ={

              Username: user,

              Password: pwd



          xmlmsg = '<?xml version="1.0" encoding="utf-8"?>'+

                  '<soap:Envelope '+

                      'xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" '+

                      'xmlns:xsd="http://www.w3.org/2001/XMLSchema" '+



                          '<UpdateListItems xmlns="http://schemas.microsoft.com/sharepoint/soap/">'+


                          '<Where><Eq><FieldRef Name="ID"><Value Type="Integer">+8+</Value></Eq></Where>'+


                              '<Batch OnError="Continue">'+

                              '<Method ID="1" Cmd="Update">'+

                                  '<Field Name="OrderID"/>'+anumber+'</Field>'+










          } catch(e){


                  cMsg: "Connection failed for",

                  cTitle: "SOAP Error"


              return null;





              cURL: webUrl,

              cAction: action,

              oAuthentication: auth,

              oRequest: xmlmsg




      The code stops with:





      Line 50 points to oRequest: xmlmsg