How do you update a popup list after a quick create?


After saving a new contact, which has been created with the quickCreate in the contacts popup window, the contacts list is updated to show only the new contact - which i think is done using the ‘field_to_name’ array in the url for the popup view window - field_to_name[]=name.

I have a custom module which i would like to work in the same way, however the ‘name’ field is not set during the quick create, but instead is set using a before save logic hook. I think this is why the pop-up list is not being re-filtered, and instead returns the full list of records.

I’ve tried changing the field to name array in the parents editviewdefs to another field, without any success - the url changes but I must be going about this the wrong way?

How can i update the popuplist after quickcreating a record - if the name field has not yet been populated?


As a workaround, i’ve put the ‘name’ field within a tab on the quickcreate layout.

I then included a javascript file in quickcreatedefs, and the script effectively replicates the function of the logic hook by updating the name field when the value of other fields change.

It’s not a great solution, but seems to work ok.