1

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.

1
  • Comments are not for extended discussion; this conversation has been moved to chat. Commented Jul 19, 2016 at 14:49

2 Answers 2

3

Looks like issue with the internal name, please confirm the column internal name.

try with may be "name" columns internal name, this can be default "Title"

valuepairs:[["Title",name], ["description", description]]

0

It is actually a pretty nooby problem, I changed the display name of fields to static name and that works perfectly. Thanks for the community help and hope this answer could be helpful for the others.

1
  • You should accept Anuja's answer as correct, since he's the one who pointed out that you needed to use the internal name. Commented Jul 19, 2016 at 15:42

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.