Removing Awaiting Acceptance in HR Case
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-04-2016 06:41 PM
Has anyone successfully remove the Awaiting Acceptance State in an HR case?
What i'm trying to achieve is set the state of the ticket to Closed Complete from Work in Progress when the Closed Complete button (UI action) is clicked.
In the "sf_state_flow" table i already turn off the SF0000340.
Change the Ending state of SF0000324 to Closed Complete.
The workflow is not executing and I only change the condition so that it will not execute.
Choice List values in State are;
Closed complete = 3;
Work in progress = 18;
Awaiting acceptance = 20;
Edited the Manual script to
current.state = 3;
current.update();
When I created an HR ticket and clicking "Closed Complete" UI action the state changes to "Awaiting Acceptance" instead of "Closed Complete".
I also tried turning off all State Flows and the OOTB UI Action.
I then created a custom UI action, and the state still changes to Awaiting Acceptance when clicking the Closed button.
Even doing a glidequery and doing update does not work, it still changes the state to Awaiting acceptance.
Below is a sample script that will set the ticket to Closed complete. However, upon gr.update the hr_case.state becomes 20 (Awaiting acceptance) instead of 3 (Closed complete).
var x = current.sys_id;
var gr = new GlideRecord('hr_case');
gr.addQuery('sys_id', x);
gr.query();
if (gr.next()){
gr.state = 3;
gr.update();
gs.addInfoMessage('The ticket has been closed.');
action.setRedirectURL(current);
}
Update:
I got a workaround for this at the moment by adding a workflow, but should also work in a business rule.
The workflow will set the state values to 3 (Closed Complete) if the Active is false.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-05-2017 02:46 PM
I believe what you need to do is modify the else on line 09 change that to current.state=3
that is setting it to awaiting acceptance if it isn't an offboarding item.