SetAbortAction is not working
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-05-2024 03:08 AM
Hi,
I've a issue in Before BR.
current.setAbortAction(true) is not working.
Suppose on incident i've created a befor br when incident state changes new to in progress then setabortaction will work. But when state changes new to inprogress it remains on the state of in progress and shows error of "invalid update" and on refreshing the page state auto changes to new.
I want setabort action doesn't change the state because when it reaches to the state then it trigger the Workflow and send approvals also impact the user experience.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-05-2024 07:16 AM
That's why I mentioned 'If abort action is the main operation', or perhaps I Should have mentioned the ONLY operation 😉
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-05-2024 03:44 AM
Hi @nowitsvashu
Please check this-
(function executeRule(current, previous /*null when async*/) {
if (current.state == '2' && previous.state != '2') { // '2' represents the in progress state, adjust it according to your instance
current.setAbortAction(true);
current.state.setDisplayValue(previous.state.getDisplayValue());
}
})(current, previous);
Please mark my answer helpful and correct.
Regards,
Amit
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-11-2025 07:10 AM
Try Increasing the order of BR
Please Mark helpful if it works for you