The CreatorCon Call for Content is officially open! Get started here.

Declarative action for related list UIB

IB3
Giga Contributor

 

Hello,

 

I’m working on a declarative action for a related list and I was able to display it on a specific table using a UXF Client Action:

 Screenshot 2025-09-18 131449.png

 

I configured the UserGivenTable correctly, and the modal dialog displays the desired table. The payload of the "Specify client action" currently looks like this:

{
  "label": "{{label}}",
  "userGivenTable": "{{userGivenTable}}",
  "table": "{{table}}",
  "parentRecordSysId": "{{parentRecordSysId}}",
 "relatedListName": "{{relatedListName}}",
 "hideSelectAll": "{{hideSelectAll}}",
  "parentFieldName": "{{parentFieldName}}",
  "referencedFieldName": "{{referencedFieldName}}",
  "extensionPoint": "{{extensionPoint}}",
  "view": "{{view}}",
  "columns":{{columns}},
  "type": "{{type}}" ,
  "query": "{{query}}"
}

  

 

Problems I’m facing:

 

Dynamic query for filtering:
I need to add a dynamic query to filter the records shown in the modal. In my case, the expected result should only be 2 records, but I’m not sure how to pass that query dynamically.

Screenshot 2025-09-18 131402.pngThe second problem:

When one or more records are selected, I want to:

  • Call Script Include with the selected sys_ids.
  • Execute some business logic form this SI .
  • Close the modal.
  • Refresh the related list.

I haven’t found where to configure this logic in the declarative action.

 

I also tried using a declarative_action_type Client Script to manipulate the form with JavaScript, but all parameters came through as undefined, so that approach didn’t work as expected.Screenshot 2025-09-18 132221.png

 

Any guidance on how to approach the dynamic query and the record selection → Script Include → modal close → refresh flow would be greatly appreciated.

@Brad Tilton – could you please provide advice on how to best handle this?

 

5 REPLIES 5

Shruti
Mega Sage
Mega Sage

Hi

You can either use query or extension point to filter the records

E.g.

Shruti_0-1758261675346.png

 

OR

Shruti_1-1758261695504.png

 

 

IB3
Giga Contributor

Thank you for your reply.


Unfortunately, this doesn’t work for me because I need to pass the value as a parameter. The solution you suggested looks like a hardcoded value in the JSON object. I would appreciate it if you could suggest an alternative approach that allows parameterized values.

 

Thanks in advance. 

Ivan B.

Can you please explain the use case of passing dynamic value as parameter

IB3
Giga Contributor

Hi Shruti,

 

Thank you for the follow-up. Let me clarify my use case:

I need the query to be dynamic, not hardcoded, because the filter depends on the parent record context. For example:

  • When the action is triggered from a related list, I want to filter the modal records by a field on the parent record (parentRecordSysId or another property).
  • In my test case, the parent record has a specific field value (e.g., location=XYZ), and I only want to show child records that match that same location. Since the value changes depending on which parent record is opened, I can’t hardcode it in the JSON.

 

Basically, I need to pass a parameter like location={{parentRecord.location}} (or equivalent) so the query is evaluated dynamically at runtime.

 

Additionally, after the user selects one or more records, the desired flow is:

  1. Call a Script Include with the selected sys_ids (to run custom logic).
  2. Close the modal.
  3. Refresh the related list so the changes are visible immediately.

Could you suggest how best to handle:

  • Passing the parent context dynamically into the query.
  • Configuring the post-selection logic (Script Include call + modal close + related list refresh).

Thanks again for your help!

 

Ivan B.