Hi there,
when creating a contract a renewal reminder call is created using the dates set within the contract, that’s great. However, I’d like it to also set a reminder on the call, ie. a popup reminder or an email reminder.
The file modules/AOS_Contracts/AOS_Contracts.php has the code for creating the call but I’m not sure how I can add the reminder config to it;
function createReminder(){
require_once('modules/Calls/Call.php');
$call = new call();
if($this->renewal_reminder_date != 0){
if(!isset($this->call_id)) {
LoggerManager::getLogger()->warn('Call is not set for reminder creation.');
$call->id = null;
} else {
$call->id = $this->call_id;
}
$call->parent_id = $this->id;
$call->parent_type = 'AOS_Contracts';
$call->date_start = $this->renewal_reminder_date;
$call->name = $this->name . ' Contract Renewal Reminder';
$call->assigned_user_id = $this->assigned_user_id;
$call->status = 'Planned';
$call->direction = 'Outbound';
$call->reminder_time = 60;
$call->duration_hours = 0;
$call->duration_minutes = 30;
$call->deleted = 0;
$call->save();
$this->call_id = $call->id;
}
}