Friday, 29 September 2017

SPServices : How to update SharePoint list item?


$(document).ready(updateListItem(12,"Next3"));

function updateListItem(itmeID,newTitle) {
 
    $().SPServices({
        //webURL: "https://domain/site_coll/site/",
        operation: "UpdateListItems",
        valuepairs: [["Title", newTitle]],
        async: false,
        listName: "Test List",
        ID: itmeID,
        completefunc: success_updateListItem
    });
 
}

function success_updateListItem(xData, status) {
alert(status);
}

No comments:

Post a Comment