How to use showRecord without lookUpWindow?

How is it possible to call the function scopes.svyLookupWindows.showRecord() directly without a call from scopes.svyLookupWindows.showLookupWindow()? The new record button of the lookup window calls the function:

function newRecord(event) {
	/** @type {Number} */
	var _index = elements.tab_searchFields.tabIndex
	var _form = elements.tab_searchFields.getTabFormNameAt(_index)
	scopes.svyLookupWindows.showRecord(forms[_form].foundset,vProgram, true, controller.getName())//also new record
}

But this:

	var _form = forms.Frm_Customers_dtl.controller.getName();
	scopes.svyLookupWindows.showRecord(forms[_form].foundset,'Customers', true, controller.getName());

or this:

	scopes.svyLookupWindows.showRecord(forms.Frm_Customers_dtl.foundset,'Customers', true, controller.getName());

does not work, if the save button is clicked.:

[attachment=0]2013-06-18 16_06_24-Fehler.png[/attachment]

What is the difference between getTabFormNameAt(_index) and getName()? In Servoy I can’t open the declaration of getTabFormNameAt(_index)? Where is the function defined?

Hi,

This is the sample from sampleuse_navigation:

function showCategory(event) {
// get the mode of the current view
var _mode = forms[getToolbarFormName()].vMode;

var oParams = new Object();
if (_mode == ‘edit’) {
oParams.mode = “editNoCommit”; // Can be either “editCommit” or “editNoCommit”
oParams.pk = foundset.categoryid
oParams.fields = [“categoryname”];
oParams.data = [“test garbage”];

scopes.svyLookupWindows.showLookupWindow(event, null, “Categories”, null, null, oParams);
} else {
oParams.mode = “show”;
oParams.pk = foundset.categoryid
scopes.svyLookupWindows.showLookupWindow(event, null, “Categories”, null, null, oParams);
}
}