Issue in BR
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-26-2024 05:59 AM
I have created a new state as pending, and if a case changes from work in progess to closed, I have created a BR with set abortaction to put the state back to pending. Its updating the state to pending but making the case as state inactive which should not be happening. Please help me with suggestions.
Script used --
Thanks,
Mourya

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-26-2024 07:57 AM
@Sagar Rd Since you didn't give the complete context, I am making a suggestion here based on the current context. You can try the following script and see if it works for you.
(function executeRule(current, previous /*null when async*/) {
gs.addInfoMessage('State cannot be changed from Ready to closed complete');
current.setAbortAction(true);
current.state = 999;
current.active=true;
current.update();
// Add your code here
})(current, previous);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-26-2024 08:09 AM
@Sandeep Rajput Thanks for your response. Instead of update the active field to true, I would like to know the issue what might have causing this issue. Please let me know if any need any information.
Thanks,
Mourya

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-26-2024 08:21 AM
What order is your BR? The OOB BR 'mark closed' runs at order 800 and will set the active field to false if the state is one of 3;4;7;202 (Closed Complete, Closed Incomplete, Cancelled)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-26-2024 08:25 AM
@Kieran Anson Thanks for your response, My BR Order is 100.
Thanks,
Mourya