The CreatorCon Call for Content is officially open! Get started here.

UI Action: g_navigation.openPopup always trigger even not clicking the UI Action

Tadz
Kilo Sage

Hi,

I have a UI Action that uses g_navigation.openPopup. 

But somehow whenever i click near the UI Action it will always open or trigger my UI Action.

find_real_file.png

Here is my Script:

function onclick(){

	
	var url = "/com.glideapp.servicecatalog_cat_item_view.do?v=1&sysparm_id=88938e66db0100104694e04a4896191a";
	
 	g_navigation.openPopup(url);

	
}

 

is this a known issue for servicenow?

1 ACCEPTED SOLUTION

Omkar Mone
Mega Sage

Hi 

Can you try changing the action name from onclick to something else in the ui action?

View solution in original post

7 REPLIES 7

I'm glad it worked, i had run into similar issue in past and i remembered doing something worked for me as well. The thing is there might be another onclick funtion written globally which might call an internal click as well your ui action onclick function.

 

Cheers 🙂

 

Regards

Omkar Mone

Ankur Bawiskar
Tera Patron
Tera Patron

Hi,

It seems this is client side UI action and whenever the UI action is clicked the url should be opened up.

Are you saying the url is getting opened without someone clicking the UI action?

Mark Correct if this solves your issue and also mark 👍 Helpful if you find my response worthy based on the impact.
Thanks
Ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Yes, it is getting opened without clicking the UI Action.