Multiple state mode move to actions possible in a single UI action button?
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-30-2023 06:58 PM
Hello,
I'm trying to implement a UI action button for emergency change requests where based on a conditional, it will either transition the state of the emergency change request to implement or review. Is this possible? I haven't gotten it to work. Are you only allowed one state transition per UI action button? For example:
if (comparison) { // planed end date is in the past, already implemented
g_form.setValue("state", "0");
gsftSubmit(null, g_form.getFormElement(), "state_model_move_to_review");
} else {
g_form.setValue("state", "-1");
gsftSubmit(null, g_form.getFormElement(), "state_model_move_to_implement");
}
For reference, I have already allowed both state transitions in the script include ChangeRequestStateModel_emergency. When I set the comparison variable to a constant true or false, the button will change the state.
0 REPLIES 0