Rajiv Handa
ServiceNow Employee
ServiceNow Employee

You might have seen the table asmt_assessment_instance with a link called Take Assessment or View Responses. At first glance, it appears to be a reference field, but when you click on it, it opens a GlideDialogWindow. How?

 

RajivHanda_1-1738513888003.png

 

Okay, let's take another example. You must have seen the sys_user_has_role table; there is a field called Inheritance Map, which, when clicked, brings up a detailed hierarchy of the roles. It looks pretty straightforward. You might think it's a reference field with a link......Wait.....Wait.... You can just try to do it on your own. I challenge you; it's not a reference

field.

 

In both cases, it's a dictionary field with the type UI Action List, which displays a UI action on the form/list fields. Generally, UI actions are available on list/form headers, list/form-related links, etc., but having a UI action as a table field on the form/list view is astonishing. Isn't it? 

 

Generally, organizations are moving away from the native view and instead building the apps on Service Portal or Next Experience Workspaces. Yet, the era of Native UI is not yet over. So, this feature can provide a good navigation option.

 

How it Works

 

  • Role Required: Maint, means you have to contact ServiceNow personnel to create a field for you.
  • Create a UI action with desired scripting conditions and a re-routing mechanism, or open a pop-up or include whatever client-side logic you want.
  • Create a dictionary record using the type UI Action List.
  • Add the sys_id of the UI action in the Default Value field on the sys_dicationary record.
  • That's it. A link will start showing up in the list and form views for the newly created records. 

Here are a few things to keep in mind:

 

  • Basically, the UI Action List creates a field with the type glide_list (similar to the watchlist on the incident form) with reference to sys_ui_action. 
  • When creating a dictionary record, you can add the sys_ids of multiple comma-separated UI actions (just like you see when you get a collision while previewing an update set) to the default value field.
  • The UI action links will be available only for newly created records, not all existing ones. You might have to run a script to update the sys_id of the UI action on all the previously created records. 

RajivHanda_2-1738519303409.png

 

Try it out and share any questions/feedback in the comments.

1 Comment