[Vtigercrm-developers] Custom field limit

Sutharsan Jeganathan ajstharsan at gmail.com
Tue Feb 21 05:49:08 GMT 2017


Hi

I think it is due to MySQL Row size Limit
<https://dev.mysql.com/doc/refman/5.7/en/column-count-limit.html>

   1. To avoid this, you may use a script like below to add further fields
   in vtiger_leaddetails rather than vtiger_leadcf

>
>    include_once('vtlib/Vtiger/Module.php');
>    include_once('vtlib/Vtiger/Block.php');
>
>    $blockInstance = new Vtiger_Block();
>    $blockInstance = Vtiger_Block::getInstance('LBL_LEAD_INFORMATION');
>    $fieldInstance = new Vtiger_Field();
>    $fieldInstance->name = 'pickuplocation';
>    $fieldInstance->label = 'Pickup Location';
>    $fieldInstance->table = 'vtiger_leaddetails';
>    $fieldInstance->column = 'pickuplocation';
>    $fieldInstance->columntype = 'varchar(128)';
>    $fieldInstance->uitype = 15;
>    $fieldInstance->setPicklistValues(array('Makandana
>    East','Yatawathura','Batakettara North','Moratumulla North'));
>    $fieldInstance->typeofdata = 'V~O';
>    $fieldInstance->defaultvalue = '';
>    $blockInstance->addField($fieldInstance);
>    echo 'ok';
>
   2. Otherwise you may try to convert varchar fields into tinytext in
   leadcf table, which can provide few more fields to accommodate.


Thanks

Sutharsan Jeganathan

On Tue, Feb 21, 2017 at 12:45 AM, Stuart Maynard-Keene <
stuartmaynardkeene at findmypub.com> wrote:

> Hi list, is there a limit to how many custom fields you can have for a
> module?
>
> Currently the vtiger_leadscf table is standing at 325 fields (don’t ask!)
> and suddenly when I try to add new fields through the vTiger interface its
> stopped adding them to this table but still adds the relevant picklist
> tables.
>
> Stu
>
>
> _______________________________________________
> http://www.vtiger.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20170221/9fc0fc51/attachment.html>


More information about the vtigercrm-developers mailing list