AnsweredAssumed Answered

Can you retain a value in a popup from request string?

Question asked by Richard Coleman on Feb 1, 2016
Latest reply on Feb 3, 2016 by Richard Coleman

Hi,

 

I've been trying to work around an issue I've seen here, and experienced myself: Unable to select relate field in popup in CE . It's a known bug here: SugarCRM, Inc.  .

 

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?

Outcomes