Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Creating a dropdown from vtlib
#1
For my ExactOnline module, I'm in the process of syncing the general ledgers to coreBOS from Exact. I created a dropdown in products like this:
PHP Code:
$Vtiger_Utils_Log true;
 include_once(
'vtlib/Vtiger/Menu.php');
 include_once(
'vtlib/Vtiger/Module.php');
 
$module Vtiger_Module::getInstance('Products');
 
$infoBlock Vtiger_Block::getInstance('LBL_PRODUCT_INFORMATION'$module);
 
$glaccountsField Vtiger_Field::getInstance('generalledgers'$module);
 if (!
$glaccountsField) {
 
$glaccountsField = new Vtiger_Field();
 
$glaccountsField->name 'generalledgers';
 
$glaccountsField->label 'General Ledger Accounts';
 
$glaccountsField->column 'generalledgers';
 
$glaccountsField->columntype 'VARCHAR(255)';
 
$glaccountsField->uitype 16;
 
$glaccountsField->typeofdata 'V~M';
 
$glaccountsField->setPicklistValues($GLAccountValues);
 
$infoBlock->addField($glaccountsField);
 } 

This works, but does produce errors, what am I doing wrong? Here are the errors:


PHP Code:
Strict StandardsOnly variables should be assigned by reference in /PATH/crmdevelop/include/database/PearDatabase.php on line 225
Creating table vtiger_generalledgers 
... DONE

Strict Standards
Only variables should be assigned by reference in /PATH/crmdevelop/include/database/PearDatabase.php on line 225

Strict Standards
Only variables should be assigned by reference in /PATH/crmdevelop/include/database/PearDatabase.php on line 225

Strict Standards
Only variables should be assigned by reference in /PATH/crmdevelop/include/database/PearDatabase.php on line 225
Creating Field generalledgers 
... DONE
Module language mapping 
for General Ledger Accounts ... CHECK

Catchable fatal error
Object of class Vtiger_Module could not be converted to string in /PATH/index.php on line 687 
Reply


Messages In This Thread
Creating a dropdown from vtlib - Guido1982 - 12-02-2015, 12:53 PM

Forum Jump:


Users browsing this thread: 2 Guest(s)