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.

Action not authorized on UI action override for New button

ashishagrawal
ServiceNow Employee
ServiceNow Employee

Hi Guys, 

I am trying to hide the "New" button on the reference look up pop up window based a condition. This popup is coming from the related list column reference look. In order to do that, I have created a new UI action of action name "sysverb_new" and button name "New" with condition to show/hide the New button. That works fine.

 

Now, when I click on the "New" button with that condition on, I get "Action not authorized" error. 

I am logged in as admin on my localhost instance.

I saw few suggestions regarding changing the action name and button name. I tried that too but with that solution, I see two New buttons on the form and that is not what we want. 

I have tried changing the order for the new UI action that didnt help. I tried to convert that UI action as "client". With that I don't see the Action not authorized error but I don't have access to the "action" field in the script section. I need that too for URL redirection on the New button click.

If anyone has any solution/ideas, please post it.

 

Thanks in advance,

Ashish

6 REPLIES 6

Mike Allen
Mega Sage

I think that when I have seen this in the past, changing the action name to be unique solved it.  I am not 100% sure what happens behind the scenes that causes it, as there are OOB examples of the same action name occurring twice on the same table, but I remember the changing of the action name being the fix.

Yes, I tried that but that didnt help. Its now creating two new buttons. 

You will have to condition the buttons to show at one time or the other, but not together.

I am not sure if I followed. The first New button is coming from the platform as the default New button. I dont have any control on that. I only have control on the new override new UI action to put a condition.