I donât know how to achieve what you want but here is a sample on how to dynamically remove subpanels. I hope it gives you some light on what you want to accomplish:
Thank you for the reply. Iâm trying to do something a bit different. I want to control what results are pulled from the db when we click âSelectâ inside the subpanel.
Then inside that custom class we would specify our custom filter by changing the value of $initial_filter
So we would replace $initial_filter = â;
Hereâs sample code if we want to display only records that have parent_project_id_c field value of â83b30b20-83a6-8099-b3b9-5d4a491888e6â. Note that you may have to add _advanced to the field name in order for it to work:
To find out the âfield_name_in_vardefâ, add your field to the detailview and then checkout the name of it in ânameâ in the file: custom/Extension/modules/<modulename>/detailviewdefs.php
To find out the âfield_name_in_popupâ, first add this field to your Popup view, then show this popup view by clicking âSelectâ on the subpanel on which you want to enforce the filter, then use your browserâs Developer Tools âinspectâ function to find out the ânameâ of the field for which you want to set your filter.
Afterwards, do a Admin â Repair â Quick Repair and Rebuild