Hi. I have two tables (it is an example, my needing is more complex):
reports - ReportID, Country, CustomerID...
customers - CustomerID,Name,Country, ...
In reports the CustomerID is setup with customers lookup table as usual.
When I ADD/EDIT a new report I want to select the Country, and then filter the customers lookup table by that country.
But I don't want to use dynamic selection, because, for example, I want to show the customer of that country and also the customers which don't have any country setup.
Is there any simple way to do this via javascript client code? The lookup_selecting filter is ok but it runs before outputting the page, while I need to customize the lookup table at runtime.
I can use the the client side events to intercept a field modification, and then what code can I use to rebuild the reports.CustomerID select2 list calling internal apis?