Skip to content
Snippets Groups Projects
grantDeleteProcess.js 530 B
Newer Older
S.Listl's avatar
S.Listl committed
import("Context_lib");
import("system.vars");
import("system.result");
import("Entity_lib");

var rowId = vars.get("$field.LEADIMPORTID");
var currentContext = ContextUtils.getCurrentContextId();

var canDelete = new HasLinkedObjectTester()
    .andNoEntityRows("Task_entity", "Tasks", {ObjectId_param : currentContext, RowId_param : rowId}) //Tasks
    .andNoEntityRows("Document_entity", "Documents", {AssignmentTable_param : "LEADIMPORT", AssignmentRowId_param : rowId}) //Documents
S.Listl's avatar
S.Listl committed
    .validate();