Document toolboxDocument toolbox

(2024.1) Contact Replacement Event

The Contact Replacement Event can be triggered using Custom Logic. The following parameters are Required to execute the Event.

Contact Replacement
/** * Event: System-wide Contact Replacement * Listener Class: Application_Model_Contact_Contact * Listener Method: eventReplaceContact */   PCR_Event::attachDb( "replace-contact", ["Application_Model_Contact_Contact" => "eventReplaceContact"] ); PCR_Event::trigger( "replace-contact", [ "contact" => "216121", //RecID of Contact that initiated the replacement "contactRecid" => [ "216125" //RecID of Contact that is replacing ], "replaceContactRecid" => [ "216121" //RecID of Contact getting replacing ], "comment" => "This is a comment", "deleteContact" => true, "users_recid" => "1217", //RecID of User that initiated the replacement "eventBroadcastBy" => "216121", "eventBroadcastTime" => "Oct 3, 2022, 2:47 pm", "eventBroadcastDayofWeek" => "1", "eventBroadcastHourMin" => "1447", ] );