When I add a new record from the lookup window. It runs the dc_edit method of svy_nav_fr_buttonbar_lookup_window, but not the dc_edit or dc_new method of the form that is shown to the user. In my situation it results in several related records that are not available to the user. Is this a bug or by-design?
I did some more testing and I noticed that calling the dc_new/dc_edit functions from svy_nav_base is not advisable, in my case because it changes the globals.nav.mode and I use that to perform checks when saving the records.
So i’m wondering what is the preferred method of making sure that my related records are created when I create a new record from within the lookup??
The lookup module will call the function ‘dc_new_post’ on the original form for new records. For edit it will call the function ‘gotoEdit’ on the original form.
Hi Sanneke,
The only place where ‘dc_new_post’ is called in the framework is in svy_nav_base at the end of ‘dc_new’.
Am I missing something?
I think you are in a older version then, I the newer version it will also be called in the lookup window.
i’m at 6.0.1.86 of the Framework.
Can you point me to where I can make a ‘temporary’ fix for this?
Is added the function call in svy_nav_fr_buttonbar_lookup_window.dc_edit the correct way to go?
Also when the user adds a new record using the lookup window, that new record is not automaticly selected when returning to the lookup window. Is that something that is also fixed in a newer version?