Invalid state transition error in problem

aswathi
Tera Contributor

Hi,

I have a requirement to add new state in problem. I have created a new ui action button "Awaiting Information"  and when we click this will ask to enter additional comments and once added the state of the problem needs to change to "Awaiting Information".

Below is the ui action script. However i am getting error "Invalid state transition. Can not update from state 'New' to state 'Awaiting Information' with given values.

I have added the new state in the task table and modified the script includes,ProblemStateSNC, ProblemStateUtilsSNC to add the new state. Please guide what i am missing here.

 

1 ACCEPTED SOLUTION

Community Alums
Not applicable

Hello, you need to check State Models for problem. For new state specify condition that it should change state from "New" to "Awaiting Information"

 

I was also facing the same issue for normal change request. I was getting Can not update state form Authorize to New.

For that I have modified Sate Model for Normal change request.

 

find_real_file.png

View solution in original post

8 REPLIES 8

Ankur Bawiskar
Tera Patron
Tera Patron

Hi Swathi,

Check any before update business rule on that table is blocking it?

Regards

Ankur Bawiskar

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Cant find any BR which is blocking.

 

The script include has below Function.

 

validateStateTransition: function(problemGr, state) {

if (!problemGr || !state || !problemGr.isValid())
return false;

if (sn_sm.RecordStateValidator.isValidStateTransition(problemGr, state))
return true;

return false;
},

rad2
Mega Sage

Do check out if there are any changes to be done on the following script includes

  • ProblemTaskState
  • ProblemTaskStateSNC
  • ProblemTaskStateUtils
  • ProblemTaskStateUtilsSNC

 

Hope this helps!

Community Alums
Not applicable

Hello, you need to check State Models for problem. For new state specify condition that it should change state from "New" to "Awaiting Information"

 

I was also facing the same issue for normal change request. I was getting Can not update state form Authorize to New.

For that I have modified Sate Model for Normal change request.

 

find_real_file.png