var itemArray = [];
for (var i = 1; i <= totalSPRIRowsCount; i++)
{
var listspRequests = context.get_web().get_lists().getByTitle(listspRequestsTitle);
var newItemInfo = new SP.ListItemCreationInformation();
newItemInfo.set_folderUrl(_spPageContextInfo.webAbsoluteUrl + "/Lists/SPR_RequestItems/" + curdate.getFullYear() + "/" + monthNames[curdate.getMonth()]);
var spRequestItem = listspRequests.addItem(newItemInfo);
UpdateSPRequestItem(spRequestItem,i);
itemArray.push(spRequestItem);
context.load(itemArray[itemArray.length-1]);
}
context.executeQueryAsync(
function(sender,args)
{
//waitDialogSubmit.close(SP.UI.DialogResult.OK);
SendMailOnSubmit();
},
function (sender, arg)
{
alert("error in update request : " + arg.get_message());
//waitdialogsubmit.close(sp.ui.dialogresult.ok);
redirectoncompletion();
});
for (var i = 1; i <= totalSPRIRowsCount; i++)
{
var listspRequests = context.get_web().get_lists().getByTitle(listspRequestsTitle);
var newItemInfo = new SP.ListItemCreationInformation();
newItemInfo.set_folderUrl(_spPageContextInfo.webAbsoluteUrl + "/Lists/SPR_RequestItems/" + curdate.getFullYear() + "/" + monthNames[curdate.getMonth()]);
var spRequestItem = listspRequests.addItem(newItemInfo);
UpdateSPRequestItem(spRequestItem,i);
itemArray.push(spRequestItem);
context.load(itemArray[itemArray.length-1]);
}
context.executeQueryAsync(
function(sender,args)
{
//waitDialogSubmit.close(SP.UI.DialogResult.OK);
SendMailOnSubmit();
},
function (sender, arg)
{
alert("error in update request : " + arg.get_message());
//waitdialogsubmit.close(sp.ui.dialogresult.ok);
redirectoncompletion();
});
No comments:
Post a Comment