- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-10-2021 03:15 AM
I would like to change state to close when I get solution in the middle of supporting problem without worrying the state and processing state model.
Therefore I created the UI Action for changing state to closed.
But I get the error message and state is not changed when I click this button on the form.
ERROR MESSAGE: Invalid state transition. Can not update from state 'New' to state 'Closed' with given values.
Do you have good any ideas to implement this feature?
BR,
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-10-2021 05:06 AM
Then look for the entry where the table is "problem" open it; in the "State Transitions" related list pick the "Closed" state, open it and adjust "Enter Condition" to allow entering from as many states as you need to.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-10-2021 04:14 AM
Hi Masa,
Problem state model is not letting you change/skip the states directly,
if your closing the problem, try setWorkflow(false) in your UI action.
Thank you,
Hemanth
Thank you,
Hemanth
Certified Technical Architect (CTA), ServiceNow MVP 2024, 2025
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-10-2021 04:52 AM
Hi Hemanth,
Thanks for your comments.
Yes I am thinking that is good idea and I'll try it.
Do you have the points to be careful of using setWorkflow(false) in UI Action for problem record?
BR,

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-10-2021 04:57 AM
yes, when your using setWorkflow(false) it will not trigger any business rules, workflows but its ok in your case since your directly closing the problem.
you could also cancel the workflow as well in the UI action: new Workflow().cancel(current);
if you find this response useful, mark it as correct.
Thank you,
Hemanth
Thank you,
Hemanth
Certified Technical Architect (CTA), ServiceNow MVP 2024, 2025
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-10-2021 04:20 AM
Modify the state model to allow changing to state Closed without conditions.