R28412 PartyContactMechanism - Manage Default Types

Code R28412
Entity General.Contacts.PartyContactMechanisms Entity
Name ManageDefaultTypes
Attribute IsDefault
Layer Back-End
Events Commit
Priority Early
Modify YES
Action If in the current record ('PartyContactMechanism1') 'IsDefault = True' AND there is another "old" record/s (' PartyContactMechanism2') in party contact mechanism's table for which 'IsDefault = True', then modify ' PartyContactMechanism1.IsDefault = False'.

Note: The ExecutionPriority of the rule must be 'Early', because it must be executed before rule R28407.
Description For each party, one of its 'Party Contact Mechanisms' can be as a default. The default record will be used for certain automations in the system. For Example, when selecting a Customer in Sales Orders, if a default Party Contact Mechanism is set for the customer's party, then this record is going to be automatically set in the field 'Ship To Party Contact Mechanism'.

In order to make sure that there is only one default party contact mechanism and therefore the right record is going to be automatically selected, the current rule modifies 'Is Default' as follows:

'When saving, if the field 'Is Default' is checked for the particular record and there already is another party contact mechanism/s for the same party for which the field 'Is Default' is also checked, then remove the check mark from 'Is Default' for all previous records for which it was set.
Message -
Introduced In Version

2018



Revocable NO

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