SPUpdateMultipleListItems debug true not showing error

Feb 27, 2012 at 10:10 PM

HI, I am using the latest SPServices(jquery.SPServices-0.7.1a.min.js) and latest Jquery(jquery-1.7.1.min.js).

The SPUpdateMulitpleListItems working fins if everything is correct. But for testing I created CAML query with error.

 I ran the below code and it's not showing any error and it executing the completefunc.

Please let me know what I am doing wrong.

What I am looking here is if there is any error whille updating the items need to show the error to the user else just reload the page.

function UpdateAllItems()
webURL: "", 
listName: $().SPServices.SPListNameFromUrl(), 
CAMLQuery: "<Query><Where><Eq><FieldsdRef Name='IsExported'/><Value Type='Integer'>0</Value></Eq></Where></Query>", 
batchCmd: "Update", 
valuepairs: [["IsExported", "1"]], 
debug: true,
completefunc: reloadPage()
function reloadPage()



Feb 27, 2012 at 11:54 PM

I think you are miss understanding the scope of functionality behind the debug option. It only reports a few issues that it has control of (example: invalid operation). Validation of CAML syntax is not one of them. You don't see an error because the message was successfully sent to the server and a response was successfully returned.

What you need to be checking is what Sharepoint is reporting about what you sent in. If you check the response you will see the error. That should be your mechanism for checking server side success or failure.

Hope this helps.


Sent from mobile

Feb 28, 2012 at 8:00 PM

Hi Paul,

Thanks for pointing me in the right direction. But still I had a little issue. Let me explain the scenario.

If the CAML query is wrong as I mentioned above, I am getting the following resposne and also If the Query is correct and it has 0 results also returning the same message. My question how really I can differentiate whether the 0 results because of error in Query or no results with the query?

<?xml version="1.0"?>
<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"><soap:Body><UpdateListItemsResponsehttp://schemas.microsoft.com/sharepoint/soap/"><UpdateListItemsResult><Results/></UpdateListItemsResult></UpdateListItemsResponse></soap:Body></soap:Envelope xmlns=">


Feb 28, 2012 at 11:49 PM

So maybe Mark can help. The response below I not what I'm used to seeing. Usually SP returns a cryptic exception on failure. Sorry I could not help .


Sent from mobile

Mar 12, 2012 at 2:07 AM


Usually you should get a response which includes the results of the updates (if successful) or an error (if not). I'd suggest that you look at the Net traffic with the IE Dev Tools or Firebug and make sure that the request looks good and also check the response. You can also pass in a completefunc to alert the XML, etc.