Unable to work our UI Action with URL to work on the change_management form

mattmg
Tera Guru

HI All, 

 

I have a button in the Incident form that opens in a new window on an external page that is address is stored in a  field on that form. That works fine.

 

When I try to replicate the same approach on the Change Management form, the button doesn't do anything:

 

mattmg_0-1699454151628.png

Can you advise if there are any security restrictions on change_request table that might be blocking opening URLs via UI Action?

1 ACCEPTED SOLUTION

Vasu ch
Kilo Sage

Hi @mattmg 

Below code is working for me.

 

function openURL(){
	g_navigation.open(g_form.getValue("short_description"), '_blank');
}

 

Try replacing short description with your field name.

 

View solution in original post

4 REPLIES 4

Dr Atul G- LNG
Tera Patron
Tera Patron

Hi @mattmg 

 

is it custom role u_change_manager? Can u try with OOTB role. 

*************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.

Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]

****************************************************************************************************************

u_change_manager is a field on the change_management table/form where I store links that change depending on scenario

Hi @mattmg 

 

I tried same code but not working for me.

 

Here is:

https://www.servicenow.com/community/developer-forum/how-to-open-an-url-in-new-window-from-ui-action...

 

*************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.

Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]

****************************************************************************************************************

Vasu ch
Kilo Sage

Hi @mattmg 

Below code is working for me.

 

function openURL(){
	g_navigation.open(g_form.getValue("short_description"), '_blank');
}

 

Try replacing short description with your field name.