- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-04-2024 03:38 AM
To achieve postponing the due date of an approval set in an "Ask for approval" Flow action in ServiceNow, follow these steps:
1. Update the Due Date in the Approval Record
- Ensure you update the `due_date` field of the corresponding approval record in the `sysapproval_approver` table.
2. Re-Evaluate Workflow
- After updating the `due_date`, you might need to trigger a re-evaluation of the workflow to ensure that the new due date is considered. This can be achieved through a script in a UI Action or a Business Rule.
Here is an example of a UI Action script that can be used to postpone the due date:
// UI Action Script
(function executeAction(current, previous) {
// Set the new due date
current.due_date = gs.daysAgoStart(5); // Example to set a new due date 5 days from now
current.update();
// Re-evaluate the workflow
var wf = new Workflow();
wf.update(current);
})(current, previous);
3. Ensure Flow is Dynamic
- Ensure that your Flow is designed to dynamically check the approval record's `due_date` field rather than relying on a static value set at the beginning of the Flow.
If these steps don't resolve the issue, you may need to review the Flow logic to ensure that it supports dynamic updates to the due date field.