Quantcast
Channel: SharePoint 2013 - Development and Programming forum
Viewing all articles
Browse latest Browse all 7589

Issue with SPServices - SPUpdateMultipleListItems

$
0
0

Hey all,

Having an issue here i'm trying to use the SPUpdateMultipleListItems function from SPServices. What I would like to do is update multiple list items in one list when a user goes into one of the items and enters some data on the Edit screen. When they hit save on the Edit form the click function shown below should work, but isn't. Can anyone take a look at offer input? Thanks!

<script language="javascript" src="../JS/jquery-1.11.2.min.js" type="text/javascript"></script><script language="javascript" src="../JS/jquery.SPServices-2014.02.min.js" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function() {

$("input[name$='SaveItem']").click(function(){

    var Num = $("input[id*=Number]");
    var Top = $("input[id*=Top]");
    var OrderQuantity = $("input[id*=OrderQuantity]");

    $().SPServices.SPUpdateMultipleListItems(
    {
    webURL: "https://test.sharepoint.com/test",
    listName: "List GUID",
    CAMLQuery: "<Query><Where><Eq><FieldRef Name='Top' /><Value Type='Text'>" + Top.val() + "</Value></Eq></Where></Query>",
    batchCmd: "Update",
    valuepairs: [["Number", Num.val()], ["Order Quantity", OrderQuantity.val()]],
    debug: false
    });
});</script>



Viewing all articles
Browse latest Browse all 7589

Trending Articles



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