This method is attached to a button from a banner form in a tabless tabpanel. When run for the first time in a new session it pops the dialog but fails to activate the new record command. after escaping the dialog and rerunning the method the new record function runs and a blank form is available for input. namedfoundset is set to DEFAULT ( have tried Separate). The global current_ProjectID is also recorded incorrectly on the form first time but correctly on the second execution.
Any ideas why this would be happening?
application.showFormInDialog( forms.project_dlg_scope, -1, -1, 508, 315, 'Scope', false, false, 'Scope', true);
databaseManager.setAutoSave(false);
forms.project_dlg_scope.controller.newRecord();
forms.project_dlg_scope.project_id = globals.current_ProjectID