showLookupWindow Problems

Calling showLookupWindow(event,‘returnField’,‘program’) shows the framework forms:

svy_nav_fr_lookup_window
svy_nav_fr_buttonbar_lookup_window

but I want to open /show the forms:

svy_nav_fr_lookup_window_pv
svy_nav_fr_buttonbar_lookup_window_pv

What are the differences between e.g. svy_nav_fr_lookup_window and svy_nav_fr_lookup_window_pv? Why showLookupWindow calls the first two forms?

Is the problem: “Lookup module” solved by using the forms: svy_nav_fr_lookup_window_pv and svy_nav_fr_buttonbar_lookup_window_pv?

the extension _pv means that the forms are build using the new styling of the framework. If you want to use this new style then you have to include the following code in the onOpen method of your solution:

	nav.lookupWindowFormName = "svy_nav_fr_lookup_window_pv"

The problems in the post you refer to have been fixed in the latest release of the framework.

jdbruijn:
the extension _pv means that the forms are build using the new styling of the framework. If you want to use this new style then you have to include the following code in the onOpen method of your solution:

	nav.lookupWindowFormName = "svy_nav_fr_lookup_window_pv"

Thanks, that solved the problem.

jdbruijn:
The problems in the post you refer to have been fixed in the latest release of the framework.

Is it possible to call the functions dc_new, dc_edit etc. of the form in the lookup window?

briese-it:
Is it possible to call the functions dc_new, dc_edit etc. of the form in the lookup window?

When you use the add or edit function of the lookup windows than it uses the dc_new/dc_edit function, so yes you can use those functions (providing the form in you lookup form is derived from svy_nav_base)

jdbruijn:

briese-it:
Is it possible to call the functions dc_new, dc_edit etc. of the form in the lookup window?

When you use the add or edit function of the lookup windows than it uses the dc_new/dc_edit function, so yes you can use those functions (providing the form in you lookup form is derived from svy_nav_base)

In the dc_save method of the form that extends svy_nav_base, I call:

application.output('Frm_Customers_dtl: dc_save');

If I click the save button in the lookup window (Frm_Customers_dtl), there is no output to console. Could you please clarify how to get the method called?

Then it seems to me that the form you show in the lookup is not descendant of svy_nav_base. And if it isn’t then I think you have to write your own save/edit methods.

jdbruijn:
Then it seems to me that the form you show in the lookup is not descendant of svy_nav_base. And if it isn’t then I think you have to write your own save/edit methods.

The base form “svy_nav_base” is extended by “Frm_Customers”. Then “Frm_Customers” is extended by “Frm_Customers_dtl”.

Is that a problem?

My mistake, I just had a closer look at the svyLookupWindows.showRecord function, here is the new record created and it seems that it just uses an internal vMode variable to indicate it is a new record, the rest seems to be only dc_edit is called.

	if (newRecord) {
		forms[_formname].dc_edit()
		forms[_formname]['vNew'] = 1
		forms[_editForm].controller.newRecord()