Deleting Records From Form

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();
	
}

Every relation touching this table must have…

“Allow parent delete when having related records”

…checked as well.

Unless you specifically don’t want this property checked, make sure it is on for all relations.

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.

Rob

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.