Skip to content
Snippets Groups Projects
Commit 7135f9e6 authored by Sebastian Listl's avatar Sebastian Listl :speech_balloon:
Browse files

#1064496 new Contacts could not be removed in QuickEntry

parent 9c82ed5c
No related branches found
No related tags found
No related merge requests found
......@@ -11,7 +11,7 @@ var personCount = newSelect("count(*)")
.from("CONTACT")
.join("PERSON", "PERSON.PERSONID = CONTACT.PERSON_ID")
.where("PERSON.PERSONID", personId)
.cell()
.cell();
//only delete when the contact doesnt have any functions, because that would currently lead to the person and all his functions being deleted,
// since there is only one person contact behind all the contacts.
//ToDo: come back to this and implement the solution for deleting a function (#1059167) once it'S decided how that's being implemented
......@@ -30,5 +30,7 @@ if(personCount == 1)
.andNoEntityRows("ObjectTree_entity", "TreeProvider", {ObjectIds_param : JSON.stringify([contactId, vars.get("$field.PERSON_ID")]), ObjectTypes_param : JSON.stringify([currentContext, "PrivatePerson"])})
.validate();
}
else if (personCount == 0) //special case in QuickEntry where it should be possible to remove a new Person that is not saved in the db yet
canDelete = true;
result.string(canDelete);
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment