In my form I am having UI elements to enter data and a Submit button. In onShow() event i have set databaseManager.setAutoSave(false), but when I execute form in brower adds a new empty record in table(pk is auto incremental) which should not, only on submit event should add data in table. I don't know why databaseManager.setAutoSave(false) on onShow() is not working properly or might I have missed something else.
When I start session or execute my form in browser and before any action event takes place a new empty record gets added to the table. In onShow() event I added statement databaseManager.setAutoSave(false) still adds new empty record in table. I don't know where I am wrong.
function onShow(firstShow, event) { foundset.loadRecords('SELECT requestid FROM EMPTIMEOFF WHERE EMP_ID=? ',[globals.EMPID]); databaseManager.setAutoSave(false) foundset.sort('start_dts desc'); }
When I debug the code foundset.loadRecords throws an error message: couldn't load dataset because foundset had editted records but couldn't save it Couldn't do a sort because there where edited records on this foundset
foundset.loadRecords() wants to save the record changes it has before loading a new set, otherwise these changes would be lost. If it cannot save some of them due to some validation failing (like null values for non-null fields), you will get this error.