Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-28-2024 07:43 AM
@Shidhi Please try the following.
function cancelTask() {
var closeNotes = g_form.getValue('close_notes');
if (closeNotes=='') {
g_form.setMandatory('close_notes', true);
g_form.showFieldMsg('close_notes', 'Enter Close Notes', 'error');
return false;
} else {
alert('Cancelling the task');
gsftSubmit(null, g_form.getFormElement(), 'cancelRecord');
}
}
if (typeof window == 'undefined') {
cancelTaskRecord();
}
function cancelTaskRecord() {
current.state = '4';
current.update();
action.setRedirectURL(current);
}