There is a way to identify where ui action click from

Osvaldo Jr
Tera Contributor

Hi...

I need to identify where an user click on UI Action, because this have 2 options(form button and list choice). There is a way to get it?

 

 

3 REPLIES 3

Isac Newton Gab
Tera Contributor

Hello @Osvaldo Jr ,

The following link might help you.

Determine Which UI Action Control Was Used - ServiceNow Community 

Thanks,

Isac

Anand Kumar P
Giga Patron
Giga Patron

Hi @Osvaldo Jr ,

To get ui action sys_id 

1) Open browser inspect option and select an element to inspect option/icon( left side 1st icon).

You can see the gsft_id=42df02e20a0a0b340080e61b551f2909 in scripts. this is the UI action sys_id.

AnandKumarP_1-1702987262013.png

 


2)Below script will show only actionname.

 

function onSubmit() { 
     var uitype = g_form.getActionName();
     alert('Ui action button type ' + uitype);
}

 

AnandKumarP_0-1702987066408.png

 

Mark it as helpful and solution proposed if it serves your purpose.
Thanks,
Anand

 

Aniket Chavan
Tera Sage
Tera Sage

Hello @Osvaldo Jr ,

Can I know the UI action which you are using is client side or server side, so based on that you need determine further.

 

  • So if your UI Action is server side then you can refer this below community post and add the logs inside them.

                          UI action for list and form

  • And if your code is client side then you can refer this below post which is also shared by @Isac Newton Gab.

                         Determine Which UI Action Control Was Used

 

Let me know your views on this and Mark Correct if this solves your query and also mark 👍Helpful if you find my response worthy based on the impact.


Regards,
Anike