Context : I was trying to use UpdateListItems to write some html textbox data into a custom list. The list "Cabinet" contains 13 columns and has already a line of data, only the first column "name" is required.
Problem : My script can capture the form data, but can not update list, nothing appear in the list.
$(document).ready(function () { $("#send").click(function () { var name = $("#name").val(); var description = $("#description").val(); CreateNewItem(name,description); return false; }); }); function CreateNewItem(name, description) { $().SPServices({ operation: "UpdateListItems", async: false, batchCmd: "New", listName: "Cabinet", valuepairs: [["name", name], ["description", description]], completefunc: function (xData, Status) { window.status = status; window.alert(name+description); } });} When using SPDebugXMLHttpResult to catch the error, I got:
ErrorCode 0x80004005
ErrorText Cannot complete this action. Please try again.