Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

UI Action changes twice

DreDay3000
Tera Guru

When the UI Action is selected, the state field changes to review, then changes again to the next state. Does not stay in the review state. Any help is appreciated

1 ACCEPTED SOLUTION

Vishal Jaswal
Giga Sage
Giga Sage

Try:

current.u_state = 'review';  //set state to Published when button is clicked
action.setRedirectURL(current);
current.setWorkflow(false);
current.update();
current.setWorkflow(true);




Hope that helps!

View solution in original post

2 REPLIES 2

Vishal Jaswal
Giga Sage
Giga Sage

Try:

current.u_state = 'review';  //set state to Published when button is clicked
action.setRedirectURL(current);
current.setWorkflow(false);
current.update();
current.setWorkflow(true);




Hope that helps!

DreDay3000
Tera Guru

Thanks Vishal, that worked!