How to Configure an OnHold Button in Service Operation Workspace using Declarative Actions

SriharshaYe
Kilo Sage

Service Operation Workspace Customization

 

Declarative action: Declarative Actions are the new version of UI Actions in ServiceNow, built for modern Next Experience UIs like Workspaces, Playbooks, and Catalog Wizards.

 

Feature Declarative Action (New) UI Action (Old)

Used InAgent Workspace, UI Builder (Next Experience)Classic UI, Forms, Workspaces, Links
Code RequiredLow-code (minimal scripting)Requires client/server scripting
ConfigurationUI Builder, Declarative Action ModuleUI Action Module
FlexibilityLimited (standard actions only)Very high (custom logic with full scripting)
Best ForSimple UI actions in WorkspacesAdvanced/complex logic in Classic UI

 

Steps to Configure an OnHold Button in Service Operation Workspace

 

1.Create Action Assignment:

Navigate to All > Declarative Actions > Create New Action

SriharshaYe_0-1757661267033.png

2.Select Form Action to create a new Action Assignment by completing all the required fields on the form.

SriharshaYe_16-1757670509807.png

 

3. Set Button Visibility : Include a Layout Item that has been Created. 

-> Add the action layout item under the UX form Action Layouts related list, on the Ux Form Actions Layout Item form.

SriharshaYe_4-1757662701716.png

-> Click on edit & select incident.

SriharshaYe_3-1757662670279.png

Now, the OnHold button appears on the Incident form in Service Operation Workspace.

SriharshaYe_9-1757668563161.png

 

4.Change Button Position/Order:

-> Open UX Form Action Layout Item

SriharshaYe_8-1757668370176.png

SriharshaYe_10-1757669088318.png

-> Adjust the order of the button as required.

 

SriharshaYe_11-1757669174257.png

Now the position of the onhold button on the SOW Changes.

SriharshaYe_12-1757669376026.png

5.Configure Payload (Button Functionality)

navigate back to the Action Assignment , and open specify client action.

SriharshaYe_14-1757670384712.png

  • Update the Payload to define the functionality when the button is clicked.

SriharshaYe_22-1757674529984.png

 

6.Event Mapping (Pop-up Visibility)

  • Navigate to UX Add-on Event Mappings related list on the Action Assignment form (to make "UX Add-on Event Mappings " related list visible keep the view as default.)

SriharshaYe_17-1757671165174.png

-> Create a new Event Mapping .

SriharshaYe_21-1757673093050.png

7. Create a Custom View

->Open an Incident form → Right click → Configure > Form Layout.

SriharshaYe_18-1757672130205.png

SriharshaYe_19-1757672198381.png

-> In the SOW_Onhold_view , add the required fields.

SriharshaYe_20-1757672298003.png

Verify Functionality:

Verify that the OnHold button on the SOW works as expected: when clicked, a pop-up with the required fields should appear, and the ticket state should change to 'On Hold'.

SriharshaYe_23-1757675897343.png

-> The state of the incident Changes to OnHold when the OnHold Button on the popup is Clicked.

SriharshaYe_24-1757675948044.png

 

 

 

 

 

 

 

 

 

 

0 REPLIES 0