[Resolved] Error dialog displays "1" on method execute.

I am using the following code to pop a dialog from a table in a tab to modify related data of a project and after selecting the edit button an error dialog appears with just a “1” and the OK button.

The debug console displays

1

at C:\Documents and Settings\James\servoy_workspace\AEC101_CRM\forms\lst_project_structure\lst_project_structure_methods.js:41 (btn_Edit)

//select the right row
forms.dlg_project_structure.foundset.loadRecords(databaseManager.convertToDataSet([forms.lst_project_structure.project_id]));
//show the dialog
application.showFormInDialog( forms.dlg_project_structure,-1,-1,-1,-1,'Edit Structure',false);
//Start Transaction
databaseManager.setAutoSave(false);

I am using a similar method to edit the address’ for the project (see Below) and I have no problems at all.

//select the right row
forms.dlg_address.foundset.loadRecords(databaseManager.convertToDataSet([forms.lst_company_address.address_id]));	
//show the dialog
application.showFormInDialog( forms.dlg_address,-1,-1,-1,-1,'Edit Address',false);
//Start Transaction
databaseManager.setAutoSave(false);

I have check my relations, data, database columns…etc and am at a loss to what to do next.

Any ideas would be great!

Do you have any error in the log files?

<servoy_dir>/application_server/servoy_log.txt
<workspace_dir>/.metadata/.log

Log files as requested

So what exactly is in line 41 of lst_project_structure_methods.js?

forms.dlg_project_structure.foundset.loadRecords(databaseManager.convertToDataSet([forms.lst_project_structure.project_id]));

The line seems to be correct to me, but can you break it down a bit and check if “forms.lst_project_structure.project_id” and “databaseManager.convertToDataSet([forms.lst_project_structure.project_id])” are valid values?

This post has been modified after a good nights sleep.

My I have established that the values in your post do exist. This error can be duplicated in fresh apps.

I have found the cause but still do not know why? I have renamed my table to something else , modified methods to suite and works fine.

Gets me, I will investigate later. Thx