If I am using JavaScript Client Object Model and SP.UI.ModalDialog.showModalDialog to display a form to enter a new list item, how can I get the ID of that item after its been added?
Example javascript
var options = {};
options.url = "/YOUR_SITE/Lists/YOUR_LIST/NewForm.aspx";
options.dialogReturnValueCallback =
function (dialogResult, returnValue)
{
console.log("dialogResult=" + dialogResult +
" returnValue=" + returnValue);
// dialogResult will be 1 if saved hit, 0 otherwise
// returnValue will be undefined
}
SP.UI.ModalDialog.showModalDialog(options);