[Vtigercrm-developers] Some columns are not created on new entity module

Alan Lord (News) alanslists at gmail.com
Sat Jul 14 02:29:24 PDT 2012


On 14/07/12 02:10, possebon wrote:
> // Now let's create the fields for the module. First we'll create the
> Location Name field.
> $field1->table = $module->basetable; // indicates that the field will
> reside in the base table of your new custom module.
> $field1->uitype = 2; // means a required text box. See here for more UI
> types: http://wiki.vtiger.com/index.php/Ui_types
> $field1->typeofdata = 'V~M'; // indicates that the field is Varchar and
> is Mandatory. See here for more data types:
> http://wiki.vtiger.com/index.php/INV...~ON
> <http://wiki.vtiger.com/index.php/INV...%7EON>
> $field1 = new Vtiger_Field();

I don't think the above will work properly. You are assigning stuff to 
$field1 before you create the object with the $field1 = new 
Vtiger_Field(); instruction.

Secondly - Why are all your fields UI Type 2? Is that really what you want?

I suggest you do a bit more reading...

http://www.vtiger.com/products/crm/help/5.2.0/VtigerCRM_5.2.0_Vtlib.pdf

https://wiki.vtiger.com/index.php/Vtlib
https://wiki.vtiger.com/index.php/UI_Types
https://wiki.vtiger.com/index.php/TypeOfData
https://wiki.vtiger.com/index.php/Vtlib_Related_Entities

HTH

Al

-- 
Libertus Solutions
http://www.libertus.co.uk





More information about the vtigercrm-developers mailing list