public function process(Vtiger_Request $request)
 {
     $moduleName = $request->getModule();
     $record = $request->get('record');
     $relatedRecord = $request->get('relid');
     $relatedModuleName = $request->get('relmodule');
     $rcmModel = Vtiger_RelatedCommentModal_Model::getInstance($record, $moduleName, $relatedRecord, $relatedModuleName);
     if (!$rcmModel->isEditable()) {
         throw new NoPermittedException(vtranslate('LBL_PERMISSION_DENIED'));
     }
     $rcmModel->save($request->get('comment'));
     $response = new Vtiger_Response();
     $response->setResult(vtranslate('LBL_SAVED_RELATION_COMMENT', $moduleName));
     $response->emit();
 }
 function process(Vtiger_Request $request)
 {
     $moduleName = $request->getModule();
     $record = $request->get('record');
     $relatedRecord = $request->get('relid');
     $relatedModuleName = $request->get('relmodule');
     $rcmModel = Vtiger_RelatedCommentModal_Model::getInstance($record, $moduleName, $relatedRecord, $relatedModuleName);
     if (!$rcmModel->isEditable()) {
         throw new NoPermittedException(vtranslate('LBL_PERMISSION_DENIED'));
     }
     $viewer = $this->getViewer($request);
     $viewer->assign('MODULE', $moduleName);
     $viewer->assign('RELATED_RECORD', $relatedRecord);
     $viewer->assign('RELATED_MODULE', $relatedModuleName);
     $viewer->assign('COMMENT', $rcmModel->getComment());
     $this->preProcess($request);
     $viewer->view('RelatedCommentModal.tpl', $moduleName);
     $this->postProcess($request);
 }