Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Create a second 'related user' field in a module
#6
I tried the following code to add a "101" field to SalesOrder:

PHP Code:
include_once('vtlib/Vtiger/Module.php');

$module Vtiger_Module::getInstance('SalesOrder');
$blockInstance Vtiger_Block::getInstance('LBL_SO_INFORMATION'$module);

$fieldInstance = new Vtiger_Field();
$fieldInstance->name 'reports_to_id';
$fieldInstance->table 'vtiger_salesorder';
$fieldInstance->column 'executing_user_id';
$fieldInstance->columntype 'INT(11)';
$fieldInstance->uitype 101;
$fieldInstance->typeofdata 'V~O';
$blockInstance->addField($fieldInstance); 

This worked, but gave me the following error:

PHP Code:
Catchable fatal errorObject of class Vtiger_Module could not be converted to string in index.php on line 687 

Does anyone know what went wrong? As said, the field was created.
Reply


Messages In This Thread
RE: Create a second 'related user' field in a module - Guido1982 - 12-20-2016, 06:48 AM

Forum Jump:


Users browsing this thread: 2 Guest(s)