Add a Button to a form using Declarative Actions

younes_sebti
Kilo Sage

My goal is to have a custom action displayed on the action bar

younes_sebti_0-1696228166228.png

 

 

Following this post I was trying to create a custom action on a form using UI Builder.

https://www.servicenow.com/community/next-experience-articles/add-a-button-to-the-list-component-usi...

 

This solution doesn't seem to be appropriate for form action but only list actions.

 

I did the following

Create a modal

Create a handled event

Call the modal on the handled event

Create UX Actions Configurations [sys_ux_action_config]

Create a declarative action assignment [sys_declarative_action_assignment] using the new UX action

Add an M2m Action Assig Ux Action Config on the form Actions

Create a new UX Add-on Event Mapping [sys_ux_addon_event_mapping] 

 

2 REPLIES 2

younes_sebti
Kilo Sage

To anticipate some answers.

I did create the declarative action with the following parameters

Table = my target table

View = the view I'm using on my experience

model = 360935e9534723003eddddeeff7b127d - sys_id of action model form

form_position = action bar