retrieve_entity_info($crmid,"HelpDesk"); //Added to avoid the comment save, when we edit other fields through ajax edit if($fieldname != 'comments') $modObj->column_fields['comments'] = ''; $modObj->column_fields[$fieldname] = $fieldvalue; $modObj->id = $crmid; $modObj->mode = "edit"; //Added to construct the update log for Ticket history $assigned_group_name = getGroupName($_REQUEST['assigned_group_id']); $assigntype = $_REQUEST['assigntype']; $fldvalue = $modObj->constructUpdateLog($modObj, $modObj->mode, $assigned_group_name, $assigntype); $fldvalue = from_html($fldvalue,($modObj->mode == 'edit')?true:false); $modObj->save("HelpDesk"); //update the log information for ticket history $adb->pquery("update vtiger_troubletickets set update_log=? where ticketid=?", array($fldvalue, $modObj->id)); if($modObj->id != ""){ if($fieldname == "comments"){ $comments = $modObj->getCommentInformation($modObj->id); echo ":#:SUCCESS".$comments; }else{ echo ":#:SUCCESS"; } }else{ echo ":#:FAILURE"; } }else{ echo ":#:FAILURE"; } } elseif($ajaxaction == "LOADRELATEDLIST" || $ajaxaction == "DISABLEMODULE"){ require_once 'include/ListView/RelatedListViewContents.php'; } ?>