This project has moved and is read-only. For the latest updates, please go here.

SPUpdateMultipleListItems debug true not showing error

Feb 27, 2012 at 11: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 28, 2012 at 12:54 AM

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 9: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="" xmlns:xsi="" xmlns:xsd=""><soap:Body><UpdateListItemsResponse"><UpdateListItemsResult><Results/></UpdateListItemsResult></UpdateListItemsResponse></soap:Body></soap:Envelope xmlns=">


Feb 29, 2012 at 12:49 AM

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 3: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.