Declarative action for related list UIB
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
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:
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.
The 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.
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?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi
You can either use query or extension point to filter the records
E.g.
OR
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Can you please explain the use case of passing dynamic value as parameter
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 weeks ago
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:
- Call a Script Include with the selected sys_ids (to run custom logic).
- Close the modal.
- 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.