I'm using Sugar 7.6, and this is a custom module I deployed a while back, but from what I've seen, it affects all modules. Basically, the sugar code is falsely expecting all fields to exist within the module, and if you include a relate field, it will break the SQL and not return anything.
I have been attempting to work around it by adding the following in my popupdefs, and passing the record_id via an initial_filter:
'whereStatement' => " a_address.id in (select a_address_accountsa_address_idb from a_address_accounts_c where a_address_accountsaccounts_ida = '" . $_REQUEST['record_id'] . "') ",
This works perfectly...... the first time you open the popup. If you search to try and filter further, the post just goes to index.php which of course loses the URL string, and causes no results. What I want to know is:
Is there a way I can use the popup metadata to create a custom (hidden) field to make my value persistent?