Retrieve Records from getTableQuery in a Custom Resource for Dynamic Table Data Display
How can I retrieve the record ID inside the
getTableQuery
method in a custom resource so that I can dynamically display table data based on this record? Specifically, I have the following custom action:
And I want to use the retrieved record ID in the where
clause of the getTableQuery
as shown below:
Note: The custom resource is for a system that manages orders and containers, and I want to list orders for a specific container based on the record ID retrieved from the URL when editing a container.4 Replies
I think there are a few ways to do this, I'll give you an exemple from a recent project I did
Solution
This is a create page but you get the idea... save it to a public property on the page component, then you can retrieve it in any other method or field
You'll be able to do:
Works great! However i replaced the request() with the $record parameter inside the mount function because the request() was returning empty results. Thanks a lot!