There is a way to identify where ui action click from

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-16-2023 07:39 AM
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?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-19-2023 03:43 AM
Hello @Osvaldo Jr ,
The following link might help you.
Determine Which UI Action Control Was Used - ServiceNow Community
Thanks,
Isac
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-19-2023 04:00 AM - edited 12-19-2023 04:01 AM
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.
2)Below script will show only actionname.
function onSubmit() {
var uitype = g_form.getActionName();
alert('Ui action button type ' + uitype);
}
Mark it as helpful and solution proposed if it serves your purpose.
Thanks,
Anand
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-19-2023 04:14 AM
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.
- 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