Need some assistance on a bit of JQuery for writing to a MOSS 2007 list. I have the following spot of code. If I run it with just the title field, it works fine, adding additional fields doesn't work. The alert note at the bottom shows Status as success and the newID is undefined.
$().SPServices({
operation: "UpdateListItems",
async: false,
listName: "Arrest",
updates: "<Batch OnError='Continue' PreCalc='TRUE'>" +
"<Method ID='1' Cmd='New'>" +
"<Field Name='Title'>" + title + "</Field>" +
"<Field Name='Date_x0020_of_x0020_Arrest'>" + dateOfArrest + "</Field>" +
"<Field Name='Subject_x0020_Information'>" + subjectInfo + "</Field>" +
"<Field Name='Charges'>" + charges+ "</Field>" +
"<Field Name='Significant_x0020_Activity'>" + sigAct + "</Field>" +
"</Method>" +
"</Batch>",
completefunc: function (xData, Status) {
//get the ID for the newly created Issue
var newID = $(xData.responseXML).find("[nodeName=z:row]").attr("ows_ID");
alert(Status + " " + newID);
}
});
Date of Arrest is a date field
Subject Information is a multiline note
Charges is a chouce field
Significant Activity is a lookup, and I'm sending it the ID of the item to lookup to.
Thanks!