so if I use rest like method to create a list item in javascript, can I get the id of the newly created item in the callback/result function?
function createNewRecord(url, body, callback)
{
$.ajax({
type: 'POST',
url: url,
contentType: 'application/json',
processData: false,
data: body,
success: function () { callback(); }
});
}
function createAnItem() {
newItem = {};
newItem.Title = 'Hello World';
var body = Sys.Serialization.JavaScriptSerializer.serialize(newItem);
createNewRecord(urlVariable, body, onNewItemCallback);
}
function onNewItemCallback() {
//is the id of the created item available here?
}
thanks! like response, response.get_responseData() from a GET request...or something like that?