How in suitecrm-8 can I filter the data that appears in a modal when clicking on the Link button in a subpanel?

On a suitecrm 8 instance. I’ve been trying for a while to filter the data that is displayed when clicking the Link button in a subpanel. In version 7, as I have read, it is possible by extending SugarWidgetSubPanelTopButton located in public/legacy/include/generic/SugarWidgets/SugarWidgetSubPanelTopButton.php in for example public/legacy/custom/include/generic/SugarWidgets/SugarWidgetSubPanelTopSelectButtonParentTrips.php and modifying the $initial_filter variable in the display method. This is better documented in this video

But apparently this doesn’t work in suitecrm-8. I try to debug the display method but apparently it is not called

How in suitecrm-8 can I filter the data that appears when clicking on the Link button in a subpanel?

Thanks in advance

I don’t know the answer, but I would start by inspecting (browser dev tools) the GraphQL request that is launched when you click that link button.

I think it contains parameters defining the query to be made, and from the name of the action you can also look for where it’s handled in the code.