- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-14-2017 11:29 AM
HI rev,
// The following options are available for resetting the approvals:
//
// 1. Mark all existing approvals for the change as 'cancelled' and
restart the workflow to create new approvals
// new WorkflowApprovalUtils().cancelAll(current, comment);
// new Workflow().restartWorkflow(current);
//
// 2. Delete all of the existing approvals for the change and restart
the workflow to create new approvals
new WorkflowApprovalUtils().reset(current, comment);
gs.addInfoMessage('Workflow has been reset since key fields have been
modified');
//
// 3. Leave the approvals for the change in their current state and
restart the workflow.
// (so that any new approvals that are required will be created)
// if (comment)
// current.setDisplayValue('approval_history', comment);
// new Workflow().restartWorkflow(current, true);
//
}
}