i m struggling with an issue on Magento 2.4.5 creating a custom module on admin. I have created a 2 column ui with a form and listing, which renders a grid on the admin, however, no matter what i have tried, i m not able to pass the initial url param i.e. entity_id/1 to the ajax request of the grid.
I have used filter_url_params attribute on my xml, but still doesn’t seem to have any affect on it.
My code looks like this
xxx_form.xml
<insertListing name="XXXX_YYYY_item_listing" component="Magento_Customer/js/form/components/insert-listing">
<settings>
<dataLinks>
<exports>false</exports>
<imports>true</imports>
</dataLinks>
<externalProvider>XXXX_YYYY_item_listing.XXXX_YYYY_item_listing_data_source</externalProvider>
<selectionsProvider>XXXX_YYYY_item_listing.XXXX_YYYY_item_listing.XXXX_YYYY_item_listing_columns.ids</selectionsProvider>
<autoRender>true</autoRender>
<dataScope>XXXX_YYYY_item_listing</dataScope>
<ns>XXXX_YYYY_item_listing</ns>
<exports>
<link name="entity_id">${ $.externalProvider }:params.parent_id</link>
</exports>
<imports>
<link name="entity_id">${ $.provider }:data.entity_id</link>
</imports>
</settings>
</insertListing>
listing.xml
<listing>
...
<dataSource name="XXXX_YYYY_item_listing_data_source" component="Magento_Ui/js/grid/provider">
<settings>
<filterUrlParams>
<param name="entity_id">*</param>
</filterUrlParams>
<storageConfig>
<param name="indexField" xsi:type="string">entity_id</param>
</storageConfig>
<updateUrl path="mui/index/render"/>
</settings>
<aclResource>XXXX_YYYY::YYYY</aclResource>
<dataProvider name="XXXX_YYYY_item_listing_data_source"
class="XXXXYYYYUiComponentListingDataProvider">
<settings>
<requestFieldName>entity_id</requestFieldName>
<primaryFieldName>entity_id</primaryFieldName>
</settings>
</dataProvider>
</dataSource>
...
</isting>
The generated url looks like this
while it should look like this