R28707 PartyContactMechanism - Delete Last Contact Mechanism

Code R28707
Entity General.Contacts.PartyContactMechanisms Entity
Name DeleteLastContactMechanism
Attribute -
Layer Back-End
Events Commit
Record state Deleted
Priority Normal
Modify Yes
Action If the current record (PartyContactMechanism1) has been deleted, then find its Contact Mechanism (ContactMechanism1) and If ContactMechanism[PartyContactMechanism1.ContactMechanism1].Count() = 1, then delete ContactMechanism1.
Description When we create a Party Contact Mechanism the separate record for the Contact Mechanism itself (for example, the email "test@erp.bg") is stored in a separated Contact Mechanism table.

With the current rule - if the current Party Contact Mechanism has been deleted, then corresponding entry from the Contact Mechanism table is found, and if it does not refer to another

Party Contact Mechanism despite the one that has just been deleted - then Contact Mechanism is deleted as well.
Message -
Introduced In Version 2018.2
Revocable NO

* For more information about the Business Rules Documentation Template and a short explanation of each column, see topic System Business Rules.