I created a custom button using add_action. This button call a function located in a new controller tha receives an id, but the other table shows no rows where the id is not found in the URL. When the id is in the URL, everything is OK.
I used thie code to manipulated the id:
if($ssid != NULL) {
$crud->where('ss', $ssid);
}