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

New Post: UpdateListItems Only Updates the First Record

$
0
0
OK, I've done some more testing and it gets weird. I figured out the only item it will update in a series is the first item, which happens to have an ID of 1. So, breaking it down to its simplest form, I created a short script and attempted to update other folders one at a time.
function UpdateUserMsgFolders() {
    $().SPServices({
        operation: "UpdateListItems",
        async: false,
        batchCmd: "Update",
        listName: "UserMessages",
        valuepairs: [["Title", "9999999999c"], ["BaseName", "9999999999c"]],
        ID: 4,
        completefunc: function(xData, Status) {
            console.log(xData.responseText);
        }
    });
    alert("Completed updates");
}
As long as the ID is 1 (and there is a folder with the ID of 1), everything works fine. If I choose the ID of any other existing folder, the 'Title' changes for the selected folder but the 'BaseName' does not. Does this make sense to anyone?

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>