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