Ui action throwing error 'Action not authorised'.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-29-2022 04:35 AM
Standard change displaying error message "Action not authorized" on clicking Schedule button. there is no duplicate Ui action name schedule still it is showing this error.
Condition: gs.hasRole('itil,sn_change_write') && new ChangeFormUI(current).isScheduleAvailable()
script:
function moveToScheduled() {
g_form.setValue("state", "-2");
gsftSubmit(null, g_form.getFormElement(), "state_model_move_to_scheduled");
}
if (typeof window == 'undefined')
setRedirect();
function setRedirect() {
current.update();
action.setRedirectURL(current);
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-29-2022 04:46 AM
Hi,
Is there another UI action with same action name "state_model_move_to_scheduled"?
If yes, you have to update action name. It will work.
Thanks,
Sagar Pagar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-07-2022 01:07 AM
@Sagar Pagar : There is no UI action with same action name "state_model_move_to_scheduled"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-07-2022 01:34 AM
Hi @mahesh105,
You have to update action name. It will work.
Thanks,
Sagar Pagar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-07-2022 01:58 AM
@mahesh105 If you have already added the action name to the ui action then please try chnaging the function from "setRedirect();" to something else.
setRedirect(); might be some OOTB function servicenow might be using in backend
ServiceNow Community Rising Star, Class of 2023