Hi all,
I have the following method that gets called on open form:
////////On open form create a new record in form A
controller.newRecord();
var str = application.getTimeStamp();
str += security.getUserName();
userkey = str
And the following method gets called once users click on Insert button to insert a record from Form A to B:
/////////////////////////Copy the current record from Form A to B
var meesage = "";
message = 'Do you want to save the record?\n';
var message = plugins.dialogs.showInfoDialog( 'Result', message, 'YES', 'NO');
if (message == 'YES')
{
//////////////////////Create a new record in foundset
//Create a new record in foundset
forms.BEH_NEPSY.controller.newRecord();
for( var i = 1 ; i <= foundset.getSize() ; i++ )
{
var srcRecord = forms.beh_nepsy_2.foundset.getRecord(i); //src foundset
var destRecord = forms.BEH_NEPSY.foundset.getRecord(forms.BEH_NEPSY.foundset.newRecord()); //dest foundset
if (srcRecord == null || destRecord == null) break;
databaseManager.copyMatchingColumns(srcRecord,destRecord,true)
}
//Save ANY outstanding change to dest foundset
controller.saveData();
Both methods above were used to work fine in Servoy 2.1.X but since we upgraded to 3.X no record has been saved to any form that uses such method.
Cold some please let me know why Servoy is behaving this way.
Thanks in advance,
Abrahim