Announcing the Global SNUG Board of Directors. Learn more here

Help
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Mark Roethof
Tera Patron
Tera Patron

Hi there,

Adding a UI Action link as field value, in a list layout, or on a form layout, man that would be nice! Though wait, you might have seen such before, for example when working with Update Sets and Previewing Problems. The "Available Actions" field shows even multiple links. So what is that? How does it work? Can you actually achieve such yourself?

It's absolutely not new and already exists for years, though hardly documented:

UI Actions List


Example: Link

Two out-of-the-box examples, one which already exists for years, one which exists since the introduction of Instance Scan (Quebec):

Update Set Preview Problems

find_real_file.png

Scan Results

find_real_file.png


Field type: UI Actions List

So what is this? How does it work? It concerns Field type "UI Action List". A field type that you won't come across that quickly, basically because it's not used that much out-of-the-box (only 14 fields of this type on a clean instance) and because the UI Action List field type is hidden. The Field class record [sys_glide_object] has Visible set as false. When setting Visible to true you would see the UI Actions List field type when working with new fields.

find_real_file.png

Why this field type is hidden? No clue. Like I mentioned, UI Actions List is hardly documented. It's not like it's a legacy field type, it's even used for a newly introduced field in the Quebec release.

When you would change Visible to true on the Field class record, UI Action List is available to select as field type:

find_real_file.png

Looking into how this field works, why one or more links are shown: when opening a record that contains a field of type UI Actions List, you'll notice that that field actually contains one or more (comma separated) sys_ids. Sys_ids?! Sys_ids from… UI Actions! Just like the name of the field type actually. So the trick is to have the field automatically filled with the sys_ids of one or more UI Actions.


UI Action

Key need to knows about the UI Action that you could use in the UI Actions List field:

1. "Name" is what you would see as a link
2. Set "Client" to true
3. Set "Form link" to true
4. "Script" anything you'd like! It could be just opening a certain URL or even executing certain script logic. You don't have to limit yourself to just a "link".

---


And that's it actually. Hope you like it. If any questions or remarks, let me know!

👍
If this post helped you in any way, I would appreciate it if you hit bookmark or mark it as helpful.

Interested in more articles, blogs, videos, and Share projects on General / Platform I published?
General / Platform


Kind regards,
Mark
2020-2021 ServiceNow Community MVP
2020-2021 ServiceNow Developer MVP

---

LinkedIn

Comments
Community Alums
Not applicable

is there a way to not show the Field name?

Akshat0108
Tera Explorer

but it is read only

Mark Roethof
Tera Patron
Tera Patron

What is read only?

Version history
Last update:
‎06-27-2021 10:42 PM
Updated by: