mirror of
https://github.com/VTECRM/vtenext.git
synced 2026-02-26 16:18:47 +00:00
46 lines
1.3 KiB
PHP
46 lines
1.3 KiB
PHP
<?php
|
|
/*************************************
|
|
* SPDX-FileCopyrightText: 2009-2020 Vtenext S.r.l. <info@vtenext.com>
|
|
* SPDX-License-Identifier: AGPL-3.0-only
|
|
************************************/
|
|
|
|
// crmv@67410
|
|
|
|
global $currentModule, $current_user;
|
|
$modObj = CRMEntity::getInstance($currentModule);
|
|
|
|
$ajaxaction = $_REQUEST["ajxaction"];
|
|
if($ajaxaction == "DETAILVIEW")
|
|
{
|
|
$crmid = $_REQUEST["recordid"];
|
|
$tablename = $_REQUEST["tableName"];
|
|
$fieldname = $_REQUEST["fldName"];
|
|
$fieldvalue = utf8RawUrlDecode($_REQUEST["fieldValue"]);
|
|
if($crmid != "")
|
|
{
|
|
$permEdit = isPermitted($currentModule, 'DetailViewAjax', $crmid);
|
|
$permField = getFieldVisibilityPermission($currentModule, $current_user->id, $fieldname);
|
|
|
|
if ($permEdit == 'yes' && $permField == 0) {
|
|
$modObj->retrieve_entity_info($crmid,$currentModule);
|
|
$modObj->column_fields[$fieldname] = $fieldvalue;
|
|
|
|
$modObj->id = $crmid;
|
|
$modObj->mode = "edit";
|
|
$modObj->save($currentModule);
|
|
if($modObj->id != "") {
|
|
echo ":#:SUCCESS";
|
|
} else {
|
|
echo ":#:FAILURE";
|
|
}
|
|
} else {
|
|
echo ":#:FAILURE";
|
|
}
|
|
} else {
|
|
echo ":#:FAILURE";
|
|
}
|
|
} elseif($ajaxaction == "LOADRELATEDLIST" || $ajaxaction == "DISABLEMODULE"){
|
|
require_once 'include/ListView/RelatedListViewContents.php';
|
|
}
|
|
//crmv@17001e
|
|
?>
|