When configuring the Requested Items related list under a Change Request in Service Operations Workspace (SOW), there are no out-of-the-box buttons available to add or remove related records.

This guide focuses on creating the Add Requested Item to Change Request (o2m) declarative action to enable users to link Requested Items (RITMs) directly from within the workspace.


1. Background

The relationship between Change Request and Requested Item (sc_req_item) is a one-to-many (o2m) relationship, where multiple RITMs can be related to a single Change Request via the parent field.

Since these actions aren’t available by default, we use the Now Experience Framework to build Related List Actions through Declarative Actions, Action Payload Definitions, and UX Add-on Event Mappings.


2. Create the “Add” Declarative Action

Step 1: Navigate to Related List Actions

  • Go to Now Experience Framework → Declarative Actions → Related List Actions.
  • Click New.

Step 2: Configure the Action Assignment

Fill in the fields as shown below:

FieldValue
Action labelAdd
Action nameadd_ritm_to_cr
Implemented asUXF Client Action
Specify client actionADD_RITM_TO_CR
TableRequested Item (sc_req_item)
ViewService Operations Workspace
Button typePrimary
ActiveChecked
Record Selection RequiredUnchecked

Once complete, click Update.


3. Define the Action Payload

Next, define how this action will behave when invoked.

Navigate to Now Experience Framework → Declarative Actions → Action Payload Definitions and create a new record.

Payload Definition Fields:

FieldValue
KeyADD_RITM_TO_CR
LabelADD RITM TO CR
Applicable ToRelated List

Payload Configuration

Paste the following payload JSON in the Payload field:

{
  "label": "translate(Add)",
  "userGivenTable": "sc_req_item",
  "table": "{{table}}",
  "parentRecordSysId": "{{parentRecordSysId}}",
  "parentFieldName": "parent",
  "referencedFieldName": "sys_id",
  "extensionPoint": "DEFAULT",
  "view": "Default",
  "columns": "number,short_description",
  "type": "o2m",
  "hideSelectAll": false,
  "relatedListName": "{{relatedListName}}"
}

This payload defines:

  • The o2m relationship between Change Request and Requested Item.
  • The columns displayed in the modal (number, short description).
  • The parentFieldName (parent) that links the RITM to the Change Request.

Click Update once done.


4. Configure UX Add-on Event Mapping

To trigger the modal popup for record selection, define a UX Add-on Event Mapping.

Navigate to:

Now Experience Framework → UX Add-on Event Mappings

Create a new record and complete the following:

FieldValue
Event Mapping NameaddRitmToChange
Source ComponentRelated Records
Source Declarative Actionadd_ritm_to_cr
ControllerForm
Target Event[Record Page] Open modal
ActiveChecked

In the Target Payload Mapping, paste the following JSON structure:

{
  "container": {
    "fields": {
      "container": {
        "columns": {
          "binding": { "address": ["columns"] },
          "type": "EVENT_PAYLOAD_BINDING"
        },
        "extensionPoint": {
          "binding": { "address": ["extensionPoint"] },
          "type": "EVENT_PAYLOAD_BINDING"
        },
        "hideSelectAll": {
          "binding": { "address": ["hideSelectAll"] },
          "type": "EVENT_PAYLOAD_BINDING"
        },
        "label": {
          "binding": { "address": ["label"] },
          "type": "EVENT_PAYLOAD_BINDING"
        },
        "parentFieldName": {
          "binding": { "address": ["parentFieldName"] },
          "type": "EVENT_PAYLOAD_BINDING"
        },
        "parentRecordSysId": {
          "binding": { "address": ["parentRecordSysId"] },
          "type": "EVENT_PAYLOAD_BINDING"
        },
        "referencedFieldName": {
          "binding": { "address": ["referencedFieldName"] },
          "type": "EVENT_PAYLOAD_BINDING"
        },
        "relatedListName": {
          "binding": { "address": ["relatedListName"] },
          "type": "EVENT_PAYLOAD_BINDING"
        },
        "table": {
          "binding": { "address": ["table"] },
          "type": "EVENT_PAYLOAD_BINDING"
        },
        "userGivenTable": {
          "binding": { "address": ["userGivenTable"] },
          "type": "EVENT_PAYLOAD_BINDING"
        },
        "view": {
          "binding": { "address": ["view"] },
          "type": "EVENT_PAYLOAD_BINDING"
        }
      },
      "type": "MAP_CONTAINER"
    },
    "params": {
      "container": {
        "asyncProperties": {
          "binding": { "address": ["asyncProperties"] },
          "type": "EVENT_PAYLOAD_BINDING"
        },
        "referenceFilterField": {
          "binding": { "address": ["referenceFilterField"] },
          "type": "EVENT_PAYLOAD_BINDING"
        },
        "referenceFilterLabel": {
          "binding": { "address": ["referenceFilterLabel"] },
          "type": "EVENT_PAYLOAD_BINDING"
        },
        "referenceFilterQuery": {
          "binding": { "address": ["referenceFilterQuery"] },
          "type": "EVENT_PAYLOAD_BINDING"
        },
        "referenceFilterTable": {
          "binding": { "address": ["referenceFilterTable"] },
          "type": "EVENT_PAYLOAD_BINDING"
        },
        "type": {
          "binding": { "address": ["type"] },
          "type": "EVENT_PAYLOAD_BINDING"
        }
      },
      "type": "MAP_CONTAINER"
    },
    "route": { "type": "JSON_LITERAL", "value": "mra" },
    "size": { "type": "JSON_LITERAL", "value": "lg" }
  },
  "type": "MAP_CONTAINER"
}

This mapping allows the workspace to open a modal window where users can select and add requested items related to the change.


5. Testing the Configuration

  1. Open a Change Request record in Service Operations Workspace.
  2. Go to the Related Records → Requested Items tab.
  3. You should now see Add and Remove buttons on the list header.
  4. Clicking Add opens a modal showing available Requested Items to associate.
  5. Once selected, they appear in the related list.

6. Summary

By configuring this o2m “Add Requested Item to Change Request” declarative action, you:

  • Enable end-users to add related records directly from SOW.
  • Use a fully upgrade-safe, declarative approach.
  • Eliminate the need for custom UI actions or legacy client scripts.

This setup, when combined with the Remove button configuration, delivers a complete related-list management experience for Change Requests in Service Operations Workspace.

🧠 Remember to Clear Cache

After configuring or updating Declarative Actions, Payload Definitions, or UX Add-on Event Mappings, the changes might not appear right away in Service Operations Workspace.

To make sure your new Add and Remove buttons are visible and functional:

  1. In the Application Navigator, type and open: cache.do
  2. This forces the system to reload all cached metadata and UI components.
  3. Once the cache is cleared, refresh your browser and open Service Operations Workspace again — your changes should now be reflected.

Similar Posts

Leave a Reply

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