- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā06-12-2023 05:42 AM
Hi
I am trying to change the state from 'In Review' to 'RCA' on problem ticket form using an UI Action, but I am seeing this error "Invalid state transition.Can not update from state 'In Review' to state 'Root Cause Analysis' with given values." twice.
why?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā06-12-2023 07:23 AM - edited ā06-12-2023 07:24 AM
Hi Michael
My issue is solved, just need to set the enter condition of RCA on the State Model.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā06-12-2023 05:52 AM
I don't see an In Review state baseline. Did you add one? if Yes, did you update the state model?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā06-12-2023 06:00 AM
Hi Michael, yes I have updated the state model and process flow.
So the thing is In Review will be placed in between RCA and Fix in progress.
With the help of Review button the state will be changed to In Review.
function reviewButtonClick() {
var currentState = g_form.getValue('state');
if (currentState === '103') {
g_form.setValue('state', '105'); // Set the state to "In Review"
g_form.save(); // Submit the form
// Disable auto-refresh
g_form.setDisableUnloadConfirmation(true);
// Show the progress message
g_form.showProgressMessage('Changing state to In Review...');
// Reload the form after a short delay
setTimeout(function() {
window.location.reload();
}, 2000);
} else {
alert('Cannot change state to "In Review" from the current state.');
}
}
but I want create a new button when the state is IN Review called Reassess, when click this the state needs to be changed to RCA.
but not working
var gr = new GlideRecord('problem');
gr.get(current.sys_id);
if (gr.state =='105'){
gr.state = '103';
gr.update();
gs.addInfoMessage('Problem reassessed successfully.');
}
else{
gs.addInfoMessage('not possible');
}
but not working and showing the above error mentioned.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā06-12-2023 07:23 AM - edited ā06-12-2023 07:24 AM
Hi Michael
My issue is solved, just need to set the enter condition of RCA on the State Model.