Hi all,
I have the following method to save the record and have two issues with that I like to resolve:
var message = "";
message += 'Do you want to save the change?\n'
var thePressedButton = plugins.dialogs.showInfoDialog( 'Result', message, 'OK', 'No')
if (thePressedButton != 'OK')
{
return;
}
else if (thePressedButton == 'OK')
{
controller.saveData();
message += 'Record saved.\n';
currentcontroller.loadOmittedRecords();
}
- I like to make sure if users select NO then the new record or the changes will not commit to the table.
I already have a method that onShow calls for application.setFocusLostSaveEnabled(false);
- If users select OK then if there is any error from backend DB or any other sources then return the error to the client screen.
I have already used databaseManager.startTransaction(); and databaseManager.rollback Transaction(); but no success.
Thanks for any help.
Abrahim