UpdateListItems

Sep 16, 2014 at 12:44 PM
Can anyone tell me why this function says it is completed when called, but when I go to my list it didn't create a new item?
<html>
<head>
<script language="javascript" type="text/javascript" src="http://portal.bizerba.com/Javascript/jquery-1.11.0.min.js"></script>
<script language="javascript" type="text/javascript" src="http://portal.bizerba.com/Javascript/jquery.SPServices-2014.01.min.js"></script>
<script type="text/javascript" language="javascript">

function CreateNewItem(subject, name, displayDate, department, email, isRequested, rootCause, priority, version,
detailDescrip) {
var siteUrl = 'https://teams.bizerba.com/sites/technik/technischebereiche/industrie/BVS';
$.support.cors = true;
$().SPServices({
    operation: "UpdateListItems",
    webURL: siteUrl,
    async: false,
    batchCmd: "New",
    listName: "BVS_Change_Request",
    valuepairs: [["BVS_Subject", subject], ["BVS_Name", name],["BVS_Date", displayDate], ["BVS_Department", department],
    ["BVS_Email", email], ["BVS_IsRequested", isRequested],["BVS_RootCause", rootCause], ["BVS_Priority", priority],
    ["BVS_MaterialnumberorVersionoftheprogram", version],["BVS_DetailedDescription", detailDescrip]],
    completefunc: function(xData, Status) {
      alert("completed " + JSON.stringify(Status));
    }
Coordinator
Sep 16, 2014 at 12:52 PM
Too many different threads!

The Status just tells you if the "conversation" happened. It doesn't tell you that the action was successful. When you call UpdateListItems, your should get a response that shows the item as it looks after the update. Use Firebug or another Net traffic inspector to see what is actually in the response data.

M.
Sep 16, 2014 at 6:26 PM
I got it to work Ha and didn't need to use sharepoint to make a custom form and they just click the add item button my form works!! I was missing just this line of code that you don't use in your examples under UpdateListItems var site = $().SPServices.SPGetCurrentSite(); but it works and I am so happy !