Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Weird error when trying to update inventorydetails
#3
The line you suggested is indeed there, in "modules/Vtiger/Save.php", which in turn calls "checkFileAccessForInclusion" in CommonUtils.php. That function is the one printing the message.. I've tried setting globals by force, but without luck so far. Will try your method.

I see that the default "createInventoryDetails" function temporarily sets aside the currentmodule and then sets it back..

I now have:

PHP Code:
        global $current_user$currentModule;
        
$save_currentModule $currentModule;
        
$currentModule 'InventoryDetails';
        require_once(
'modules/InventoryDetails/InventoryDetails.php');

        
$invdet_focus = new InventoryDetails();
        
$invdet_focus->retrieve_entity_info($record['lineitem_id'], 'InventoryDetails');
        
$invdet_focus->mode 'edit';

        
$invdet_focus->column_fields['account_id'] = $_REQUEST['ps_accountid'];
        
$invdet_focus->column_fields['contact_id'] = $_REQUEST['ps_contactid'];
        
$invdet_focus->column_fields['assigned_user_id'] = $_REQUEST['assigned_user_id'];

        
// Overwrite column fields that have matching keys
        
foreach ($record as $key => $value) {
            if (
array_key_exists($key$invdet_focus->column_fields)) {
                
$invdet_focus->column_fields[$key] = $record[$key];
            }
        }

        
$handler vtws_getModuleHandlerFromName('InventoryDetails'$current_user);
        
$meta $handler->getMeta();
        
$invdet_focus->column_fields DataTransform::sanitizeRetrieveEntityInfo($invdet_focus->column_fields$meta);

        
$invdet_focus->save('InventoryDetails');
        
$currentModule $save_currentModule

Sadly still the same issue.
Reply


Messages In This Thread
RE: Weird error when trying to update inventorydetails - Guido1982 - 11-08-2016, 03:16 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)