BoldSignA modern eSignature application with affordable pricing. Sign up today for unlimited document usage!
function ActionComplete(args) {
if (args.requestType === 'save' && args.addedRecord) {
//Newly Added Record is obtained here, which can be updated to database
var ganttRecord = args.addedRecord;
if (args.addedRecord.parentItem)
ganttRecord["ParentId"] = ganttRecord.parentItem.taskId;
PageMethods.AddIt(ganttRecord.item);
} else if (args.requestType === 'delete') {
var data = args.data;
var ganttRec = data.item;
PageMethods.DeleteIt(ganttRec);
if (data.hasChildRecords) {
deleteChildRecords(data);
}
}
// To update the database during Outdent,editing,indent,predecessor update operation
else if (args.requestType === 'outdent' || args.requestType === 'recordUpdate') {
var ganttRec = args.data.item;
PageMethods.UpdateIt(ganttRec);
}
} |