When you execute the function:
- dc_new
- dc_edit
- dc_duplicate
We find with a specific parameters in the layout cause in specific cases execute twice the method. We find if we have a form in tbl view and want to edit in dtl, pass twice times by the same function, the exact part is the line #1879 of the file svy_nav_base, in the function switchForEdit
if (_edit_on_tab == 1 || (_edit_on_tab == 2 && _view == 0) || (_edit_on_tab == 0 && _panel == 1)) //the form is on the form it has to be on
Whe found if we put this configuration
That show the tbl and edit in dtl, execute twice the method because not cumply the condition of the if. But if you put this other configuration in the layout
Runs perfectly, because the if cumply with any problem and not execute other time the method.
The line the dc_ is executated other time is #1884 in the same file and function:
forms[_formName][_methodName](null, null, _formNameToolbar)
It’s important to us to fix this problem, because we have a form extending the nav_base, and we are having issues because all the functions inside are executed twice.