Document toolboxDocument toolbox

(v1) .Department Replacement Event v2.1.4.7

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

Department Replacement
/**
* Event: System-wide Department Replacement
* Listener Class: Application_Model_DeptHierarchy_DeptHierarchy
* Listener Method: eventReplaceDeptHierarchy
*/

PCR_Event::attachDb(
    'department-replacement',
    ['Application_Model_DeptHierarchy_DeptHierarchy' => 'eventReplaceDeptHierarchy']
);
PCR_Event::trigger(
    'department-replacement',
  	[ 		
		"contact" => "216121", 	//RecID of Contact that initiated the replacement
		"deptRecid" =>
		[
			"3638" 				//RecID of Department getting replaced
		],
		"replaceDeptRecid" =>
		[
			"3507" 				//RecID of Department that is replacing 
		],
		"deleteDept" => true, 
		"comment" => "This is a comment",
		"users_recid" => "1217", 	//RecID of User that initiated the replacement

		"eventBroadcastBy" => "216121",
		"eventBroadcastTime" => "Oct 3, 2022, 2:21 pm",
		"eventBroadcastDayofWeek" => "1",
		"eventBroadcastHourMin" => "1421",   
	]
);

Help Desk Portal - Email: help@pcr.com - Phone: 616.259.9242