I am having problems deleting records from a form. When I issue the controller.omitRecord() the records will be removed from the foundset. However, when I issue the controller.deleteRecord() the record is not deleted from the form or the db. I made sure that “Allow deletion of children was checked on all relations”. Below is the code I use.
if(globals.svyCore_dlg_warning('<html>Are you sure you want to <b>permanently</b> delete
RFQ "' + rfq + '" </html>') == 'OK')
{
controller.deleteRecord();
databaseManager.saveData();
}
omit record means remove the record from the foundset, not from the database.
controller.deleteRecord() should delete the current record.
The saveData is only needed if autoSave is off, otherwise the delete is performed immediately.
I figured out the problem. I went through all the relations and found that one of the relations did not have the “Allow parent to delete children records” checked. One little check was the problem. Thanks for all of your help.