Document toolboxDocument toolbox

Service Alias Range Generation Event

The Service Alias Range Generation Event can be triggered using Custom Logic. The following parameters are Required to execute the Event.

Service Alias Range Generation
/**
* Event: Alias range generation requested
* Listener Class: Application_Model_Service_ServicesAlias
* Listener Method: eventGenerateAliasRange
*/


PCR_Event::attachDb(
    "generate-alias",
    ["Application_Model_Service_ServicesAlias" => "eventGenerateAliasRange"]
);
PCR_Event::trigger(
    "generate-alias",    
	[ 		
		"SAVE_PARAMS" =>
		[
			"pn_start" => "5863820670", 		//Start of Alias range
			"pn_finish" => "5863820679", 		//End of Alias range 
			"RECID" => "addNew",
			"save-new" => "true",
			"generateNum" => 4,
			"contact" => "216121" 				//RecID of Contact that initiated the Alias generation 
		],
		"FORM_FIELD_KEY" =>
		[
			"SERVICES_ALIAS" =>
			[
				"TENANTS_RECID" => "TENANTS_RECID"
			],
			"RECID" => "RECID"
		]

		"eventBroadcastBy" => "216121",
		"eventBroadcastTime" => "Oct 4, 2022, 10:41 am",
		"eventBroadcastDayofWeek" => "2",
		"eventBroadcastHourMin" => "1041",
	]  
);