Quantcast
Channel: jQuery Library for SharePoint Web Services
Viewing all articles
Browse latest Browse all 6517

New Post: UpdateListItems Error

$
0
0

Hi All, I'm upgrading my platform to run jQuery 1.8.3 and SPServices 0.7.2.  With these files in place, I get an error each time I attempt to run the UpdateListItems operation.  I do not get the error using jQuery 1.7.2 and SPServices 0.7.1a.   I've attempted to debug as much as I can but can't find where the problem lies.  The code I'm running is basically....

//Append the Document Approvals with a placeholder record for the new documentvar lngDocID = 1151;
  $().SPServices({
       operation: "UpdateListItems",
       async: false,
       batchCmd: "New",
       listName: "Document Approvals",
       valuepairs: [["TaskOrderDocID", lngDocID]],
       completefunc: null
   });

I've also tried a variant of this operation as....

  var lngDocID = 1151;
$().SPServices({ operation: "UpdateListItems", async: false, listName: "Document Approvals", updates: "<Batch OnError='Continue' PreCalc='TRUE'>"+"<Method ID='1' Cmd='New'>"+"<Field Name='TaskOrderDocID'>"+ lngDocID + "</Field>"+"</Method>"+"</Batch>", completefunc: null });

In either case, jQuery throws an error at line 7987 and just says "Object Expected."  I can't figure out which object it's looking for.  Now, with that, it appears the Update action does occur in both instances--the new record appears in the list as it should.  I can't figure out why jQuery is throwing an error.  Has anyone experienced this with the latest versions? Do you have any ideas on what might be causing it? Thanks!

Geoff

 


Viewing all articles
Browse latest Browse all 6517

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>