What is the correct way to modify the data obtained when clicking on the selection button of a subpanel?

In a suitecrm 8 instance. Specifically Version 8.2.2. I am trying to modify the query when clicking on the link button of a subpanel in order to receive the data filtered by a field of the active module.

To this end I have followed this guide: https://www.youtube.com/watch?v=1O6AMiPU9Qw

This is a guide for suitecrm 7. It basically proposes modifying the url by adding custom parameters and consequently obtaining the desired data

The process goes through:

  • Create a copy of public/legacy/include/generic/SugarWidgets/SugarWidgetSubPanelTopSelectButton.php in public/legacy/custom/include/generic/SugarWidgets/SugarWidgetSubPanelTopSelectButtonParentmodule_a_module_b.php
  • Change the value of widget_class in the selection button to the name of the previously created element
  • Finally add a custom query param

The example shows that the desired data set is successfully achieved. But apparently when trying suitecrm-8 this logic is not invoked.

Could you give me an indication of how to achieve this in suitecrm-8

Greetings and thanks in advance