Skip to content
Snippets Groups Projects
onDelete.js 754 B
import("system.vars");
import("system.entities");

//While there is no need to implement the insert or update process the delete process needs to be specified because the 
//contexts viewmodeProvider for the editView only affect insert and update (delete has no view associated)
//let's do the db-record container the job to remove the record (additional district records can never be removed):
var rowData = vars.get("$local.rowdata");
var memberId = rowData["OBJECTMEMBERID.value"];
if (memberId)
{
    var config = entities.createConfigForDeletingRows().entity("Member_entity").uid(memberId);
    entities.deleteRow(config);
}
else
    throw new Error("Member_entity: Could not delete member entity because the given OBJECTMEMBERID was empty.");