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

New Post: SP2010 – Updating multiple list items

$
0
0
Ok, so this is what I have currently. When I hit save, it does nothing. Doesn't even save the document. I have entered this into a CEWP. Is that an incorrect spot for a PRESAVE action maybe?

Also, I wanted to clarify the field names I have below:

The 2 titles for the variables are the INTERNAL names.
The fieldref name NewColumn1 is the internal name.
The Release Date on the valuepairs is the actual title.

Am I using the right fields? Either way, wouldn't the DEBUG kick in? I am getting nothing at all. The jquery-min is 1.11 version, not the old one I was referencing in the prior code.
<![CDATA[<script language="javascript" type="text/javascript" src=" /sites/hp/JS/jquery-min.js"></script>
<script language="javascript" type="text/javascript" src=" /sites/hp/JS/jquery.SPServices-2014.01.min.js"></script>
<script language="javascript" type="text/javascript">


function PreSaveAction() {

var PCRNumberMain = $("input[title='Change_x0020_Request_x0020_Numbe']");

var ReleaseDateMain = $("input[title='Actual_x0020_Release_x0020_Date']");

$().SPServices.SPUpdateMultipleListItems({
  listName: "{11D7C2F8-8BCD-4EB8-A85C-10978D39BFED}",
  CAMLQuery: "<Query><Where><Eq><FieldRef Name='NewColumn1'/><Value Type='Text'>" + PCRNumberMain + "</Value></Eq></Where></Query>",
  batchCmd: "Update",
  valuepairs: [["Release Date", ReleaseDateMain]],
  debug: true
});

} </script> 
]]>

Viewing all articles
Browse latest Browse all 6517

Trending Articles



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