function preProcess(Vtiger_Request $request, $display = true)
 {
     parent::preProcess($request, false);
     $viewer = $this->getViewer($request);
     $moduleName = $request->getModule();
     $this->recordModel = Vtiger_Record_Model::getInstanceById($request->get('record'), $moduleName);
     $dashBoardModel = Vtiger_DashBoard_Model::getInstance($moduleName);
     $moduleModel = Vtiger_Module_Model::getInstance('Dashboard');
     $userPrivilegesModel = Users_Privileges_Model::getCurrentUserPrivilegesModel();
     $permission = $userPrivilegesModel->hasModulePermission($moduleModel->getId());
     $widgets = array();
     if ($permission) {
         $widgets = $dashBoardModel->getSelectableDetailDashboards($moduleName, $this->recordModel->getId());
     }
     $viewer->assign('DASHBOARDHEADER_TITLE', vtranslate($moduleName, $moduleName) . ': «' . $this->recordModel->getName() . '»');
     $viewer->assign('MODULE_PERMISSION', $permission);
     $viewer->assign('WIDGETS', $widgets);
     $viewer->assign('MODULE_NAME', $moduleName);
     if ($display) {
         $this->preProcessDisplay($request);
     }
 }