Add Related list button on Agent Workspace for HR case management

Community Alums
Not applicable

Hi All,

 

We have a requirement to add an "Add Jira Tickets" button to the Jira Tickets related list (relationship: Parent → HR Case) on the HR Case form.

When the "Add Jira Tickets" button is clicked, it should display a list of all Jira tickets that have the current HR Case set as their parent.

 

- Want the "Add Jira Tickets" button in the Jira Ticket Stubs related list on the HR Case form in Agent Workspace to allow users to link existing Jira records (instead of creating new ones), you'll need to configure a custom declarative action that opens a modal or list picker to select existing records.

 

Thank you.

10 REPLIES 10

Shruti
Mega Sage
Mega Sage

Hi,

1. Navigate to Now Experience Framework -> Declarative Actions -> Related List Actions

2.  Create a new related list action

Action label  - Provide an action label Eg. Add Jira Tickets

Action name - Provide an action name Eg add_jira_tickets

Implemented as - UXF Client Action

Specify client action - Create a new client action/Action Payload Definition(check Step 3 below) . Eg. Add Jira

Table - "JIRA Ticket Stubs" table name

Active  - true

 

3. Action Payload Definition . 

Add Jira
Label - Add Jira
Applicable to - Related List
Payload - Replace userGIvenTable value with jira ticket stubs table name
{
"label": "Add",
"userGivenTable": "<JIRA TICKET STUBS>",
"table": "{{table}}",
"parentRecordSysId": "{{parentRecordSysId}}",
"parentFieldName": "parent",
"referencedFieldName": "parent",
"extensionPoint": "HR_CASE_PARENT_FILTER_QUERY",
"view": "",
"columns": "number,short_description",
"type": "o2m",
"hideSelectAll": false,
"relatedListName": "{{relatedListName}}"
}

 

4. Go to the declarative action assignment created in step 2

5.  Go to the action configuration related list and add HR workspace action configID

Shruti_0-1753079261156.png

6.  Go to the UX Add-on Event Mappings related list and create a new mapping

Shruti_1-1753079286746.png

Event Mapping name - Eg. Related list Add jira
Source Component  - List - Related
Source Declarative Action  - add_jira_tickets
Active  - true
Controller - Form
Target Event - [Record Page] Open modal .Create New target event
  Label  - [Record Page] Open modal
  Event Name - RECORD#OPEN_MODAL
  Properties - [
{
"fieldType": "string",
"interfaceApiName": "",
"label": "Viewport modal - route",
"mandatory": false,
"name": "route",
"readOnly": false,
"typeMetadata": null
},
{
"fieldType": "json",
"interfaceApiName": "",
"label": "Viewport modal - fields",
"mandatory": false,
"name": "fields",
"readOnly": false,
"typeMetadata": {
"schema": {
"type": "object"
}
}
},
{
"fieldType": "json",
"interfaceApiName": "",
"label": "Viewport modal - params (Optional)",
"mandatory": false,
"name": "params",
"readOnly": false,
"typeMetadata": {
"schema": {
"type": "object"
}
}
},
{
"fieldType": "choice",
"label": "Modal size",
"mandatory": false,
"name": "size",
"readOnly": false,
"typeMetadata": {
"choices": [
{
"label": "Small",
"value": "sm"
},
{
"label": "Medium",
"value": "md"
},
{
"label": "Large",
"value": "lg"
},
{
"label": "Fullscreen",
"value": "fullscreen"
}
]
},
"valueType": "string"
},
{
"fieldType": "string",
"interfaceApiName": "",
"label": "Arial label",
"mandatory": false,
"name": "ariaLabel",
"readOnly": false,
"typeMetadata": null
}
]
 
 
Target Payload mapping
{
"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": {
"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"
}
 
 

Community Alums
Not applicable

Hi Shruti.

 

I have followed the each step, Button is not doing anu action when we click on it. 

 

Thank you.

Can you share the screenshots?

Community Alums
Not applicable

Hi,

 

PFA For your reference.

 

Thank you.