When working with Service Operations Workspace (SOW), certain related lists—like Requested Items under a Change Request—don’t include Add or Remove actions out of the box (OOTB). These actions need to be configured manually using UX Declarative Actions.

In this article, we’ll focus specifically on adding the Remove button for the Requested Items related list.


1. Background

When a Requested Item related list is added to a Change Request record in SOW, the list displays the related items but does not include OOTB Add or Remove buttons.

To manage linked records directly from the related list, we can configure declarative actions using the Now Experience Framework.


2. Steps to Create the “Remove” Declarative Action

Step 1: Navigate to Declarative Actions

  1. Go to Now Experience Framework > Declarative Actions > Related List Actions in the Application Navigator.
  2. Click New to create a new related list action.

Step 2: Configure Action Properties

Fill out the form as follows:

FieldValue
Action labelRemove
Action nameremove
Implemented asServer Script
TableRequested Item (sc_req_item)
ViewService Operations Workspace
Button typePrimary
Record Selection RequiredChecked
ActiveChecked

💡 Ensure “Workspace” is set to Service Operations Workspace so the button appears only there.


Step 3: Add the Server Script

Use the following script in the Server Script field:

current.parent = "";

if (current.update()) {
    gs.addInfoMessage(gs.getMessage("Record {0} has been removed successfully", [current.number]));
} else {
    gs.addErrorMessage(gs.getMessage("Error in removing {0} record", [current.number]));
}

Explanation:

  • The script clears the parent field, effectively removing the link between the Requested Item and the Change Request.
  • A success or error message is displayed based on the update result.

Step 4: Test the Action

  1. Open a Change Request record in Service Operations Workspace.
  2. Navigate to the Related Records tab → Requested Items related list.
  3. Select a record and click Remove.
  4. You should see a confirmation message and the item should be detached from the Change Request.

3. Result

Once configured, the Requested Items related list displays a Remove button in SOW. When clicked, it executes the server script, removing the association between the Requested Item and the Change Request while providing real-time feedback to the user.


4. Summary

By adding a declarative “Remove” action to the Requested Items related list:

  • Users can manage associations directly in Service Operations Workspace.
  • No custom UI actions or client scripts are required—just a clean declarative configuration.

This approach keeps the workspace streamlined and leverages the Now Experience Framework for maintainable, upgrade-safe customization.

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *