function _5_bind_HelpDesk($user_id, $mail_detail, $folder, $return) { $ModuleName = 'HelpDesk'; $table_name = 'vtiger_troubletickets'; $table_col = 'ticket_no'; $ossmailviewTab = 'vtiger_ossmailview_tickets'; $answered_status = 'Answered'; require_once "modules/OSSMailScanner/template_actions/prefix.php"; $ids = bind_prefix($user_id, $mail_detail, $folder, $ModuleName, $table_name, $table_col, $ossmailviewTab); if ($ids) { $conf = OSSMailScanner_Record_Model::getConfig('emailsearch'); $type = OSSMailScanner_Record_Model::getTypeEmail($mail_detail); if ($conf['change_ticket_status'] == 'true' && $type == 1) { foreach ($ids as $id) { $ModelInstance = Vtiger_Record_Model::getInstanceById($id, $ModuleName); $ticketstatus = $ModelInstance->get('ticketstatus'); if ($ticketstatus == 'Wait For Response') { $record = new $ModuleName(); $record->retrieve_entity_info($id, $ModuleName); $record->mode = 'edit'; $record->column_fields['ticketstatus'] = $answered_status; $record->save($ModuleName, $id); } } } } return array('bind_HelpDesk' => $ids); }
function _9_bind_Campaigns($user_id, $mail_detail, $folder, $return) { $ModuleName = 'Campaigns'; $table_name = 'vtiger_campaign'; $table_col = 'campaign_no'; require_once "modules/OSSMailScanner/template_actions/prefix.php"; $ids = bind_prefix($user_id, $mail_detail, $folder, $ModuleName, $table_name, $table_col); return ['bind_Campaigns' => $ids]; }
function _7_bind_Project($user_id, $mail_detail, $folder, $return) { $ModuleName = 'Project'; $table_name = 'vtiger_project'; $table_col = 'project_no'; require_once "modules/OSSMailScanner/template_actions/prefix.php"; $ids = bind_prefix($user_id, $mail_detail, $folder, $ModuleName, $table_name, $table_col); return array('bind_Project' => $ids); }
function _6_bind_Potentials($user_id, $mail_detail, $folder, $return) { $ModuleName = 'Potentials'; $table_name = 'vtiger_potential'; $table_col = 'potential_no'; $ossmailviewTab = 'vtiger_ossmailview_potentials'; require_once "modules/OSSMailScanner/template_actions/prefix.php"; $ids = bind_prefix($user_id, $mail_detail, $folder, $ModuleName, $table_name, $table_col, $ossmailviewTab); return array('bind_Potentials' => $ids); }