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

Merge branch '#1066308-KontaktDelete' into '2020.2'

#1066308-KontaktDelete Links Löschen und 360°Objects Deny

See merge request xrm/basic!433
parents 31b6836d 2538097a
No related branches found
No related tags found
No related merge requests found
......@@ -4,6 +4,7 @@ import("system.vars");
var condition = newWhere()
.andIfSet("CAMPAIGNPARTICIPANT.CAMPAIGN_ID", "$param.CampaignId_param")
.andIfSet("CAMPAIGNPARTICIPANT.CAMPAIGNSTEP_ID", "$param.CampaignStepId_param");
.andIfSet("CAMPAIGNPARTICIPANT.CAMPAIGNSTEP_ID", "$param.CampaignStepId_param")
.andIfSet("CAMPAIGNPARTICIPANT.CONTACT_ID", "$param.ContactId_param");
result.string(condition.toString());
......@@ -28,6 +28,8 @@ if(personCount == 1)
.andNoEntityRows("Offer_entity", "ContactOffers", {ContactId_param : contactId}) //Offers
.andNoEntityRows("Contract_entity", "Contracts", {ContactId_param : contactId}) //Contracts
.andNoEntityRows("ObjectTree_entity", "TreeProvider", {ObjectIds_param : JSON.stringify([contactId, vars.get("$field.PERSON_ID")]), ObjectTypes_param : JSON.stringify([currentContext, "PrivatePerson"])})
.andNoEntityRows("CampaignParticipant_entity", "CampaignParticipantsProvider", {ContactId_param : contactId})
.andNoEntityRows("Order_entity", "OrderProvider", {ContactId_param : contactId})
.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
......
......@@ -14,5 +14,9 @@ new AttributeRelationQuery(contactId, null, ContextUtils.getCurrentContextId())
newWhere("COMMUNICATION.CONTACT_ID", contactId).deleteData();
newWhere("ADDRESS.CONTACT_ID", contactId).deleteData();
newWhere("COMMRESTRICTION.CONTACT_ID", contactId).deleteData();
newWhere("AB_APPOINTMENTLINK.OBJECT_TYPE", "Person")
.and("AB_APPOINTMENTLINK.OBJECT_ROWID", contactId).deleteData();
newWhere("AB_ATTRIBUTERELATION.OBJECT_TYPE", "Person")
.and("AB_ATTRIBUTERELATION.OBJECT_ROWID", contactId).deleteData();
WorkflowSignalSender.deleted();
\ No newline at end of file
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