I am trying to get request param id
when editing the page in my component dataprovider file.
But getting always null value in it.
I am rendering a grid in the product edit page and I need to filter my data based on the current edit page. and when I try to click on the tab it fires the mui/index/render
action and does not get product id in it.
I have also tried using this code (int)$this->request->getParam('current_product_id');
but it is also returning an empty value.
can anyone please guide me on this?
even in the registry not available.
Here is the dataSource tag from my ui component file
<dataSource name="pricelist_listing_data_source">
<argument name="dataProvider" xsi:type="configurableObject">
<argument name="class" xsi:type="string">Test\PriceLevel\Ui\DataProvider\Product\PricelistDataProvider</argument>
<argument name="name" xsi:type="string">pricelist_listing_data_source</argument>
<argument name="primaryFieldName" xsi:type="string">id</argument>
<argument name="requestFieldName" xsi:type="string">entity_id</argument>
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="component" xsi:type="string">Magento_Ui/js/grid/provider</item>
<item name="update_url" xsi:type="url" path="mui/index/render"/>
<item name="storageConfig" xsi:type="array">
<item name="cacheRequests" xsi:type="boolean">false</item>
</item>
</item>
</argument>
</argument>
</dataSource>
print_r($this->request->getParams())
params