generateEntityModel($this->focus, 'HelpDesk', 'helpdesk_', $model);
$entity = CRMEntity::getInstance('Products');
if($this->focusColumnValue('product_id'))
$entity->retrieve_entity_info($this->focusColumnValue('product_id'), 'Products');
$this->generateEntityModel($entity, 'Products', 'product_', $model);
if($this->focusColumnValue('parent_id'))
$setype = getSalesEntityType($this->focusColumnValue('parent_id'));
$account = CRMEntity::getInstance('Accounts');
$contact = CRMEntity::getInstance('Contacts');
if($setype == 'Accounts')
$account->retrieve_entity_info($this->focusColumnValue('parent_id'), $setype);
elseif($setype == 'Contacts')
$contact->retrieve_entity_info($this->focusColumnValue('parent_id'), $setype);
$this->generateEntityModel($account, 'Accounts', 'account_', $model);
$this->generateEntityModel($contact, 'Contacts', 'contact_', $model);
$this->generateUi10Models($model);
$this->generateRelatedListModels($model);
$model->set('helpdesk_owner', getUserFullName($this->focusColumnValue('assigned_user_id')));
return $model;
} catch (Exception $e) {
echo '';
if($e->getMessage() == $app_strings['LBL_RECORD_DELETE']) {
echo $app_strings['LBL_RECORD_INCORRECT'];
echo '
';
} else {
echo $e->getMessage();
echo '
';
}
return null;
}
}
}
?>