Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagephp
titleContact Replacement
linenumberstrue
/**
* 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" 			//ReciDRecID of Department getting replacedContact that is replacing 
		],
		"replaceContactRecid":
		[
			"216121" 			//RecID of DepartmentContact thatgetting is replacing 
		],
		"comment":"5This 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", 
}	 	
	]
);