[Vtigercrm-developers] A note on Role based picklists in vtiger6

salim salimcmd at gmail.com
Fri Mar 22 04:57:19 UTC 2013


Hi,
This one of my use case, We have a client, They have branch's in 20 states
in India  in every states they have  2 to 5 branch's.

In our custom module we have a field like this

   1. /*
   2.  * Field for Associated Branch
   3.  */
   4. $associatedBranchField = Vtiger_Field::getInstance('branch',$module);
   5. if (!$associatedBranchField) {
   6.     $associatedBranchField = new Vtiger_Field();
   7.     $associatedBranchField->name = 'branch';
   8.     $associatedBranchField->label = 'Associated Branch';
   9.     $associatedBranchField->columntype = 'VARCHAR(100)';
   10.     $associatedBranchField->uitype = 15;
   11.     $associatedBranchField->typeofdata = 'M~O';
   12.     $infoBlock->addField($associatedBranchField);
   13.     $associatedBranchField->setPicklistValues(array('branch Kerala 1'
   ,'branch Kerala 2','branch Kerala 3','branch Karnataka 1',
   'branch Karnataka 1','branch Karnataka 1')); // Branch list goes here.
   the values will be more than 60
   14. }



Then i have Created roles to every states and associated the values. So i
could accomplish this easily by role based pick list,

 My module script will be look like this. if  you guys drop the support.

-

   1. /*
   2.  * Field for Associated Branch
   3.  */
   4. $associatedBranchField1 = Vtiger_Field::getInstance('branch',$module);
   5. if (!$associatedBranchField1) {
   6.     $associatedBranchField1 = new Vtiger_Field();
   7.     $associatedBranchField1->name = 'branch';
   8.     $associatedBranchField1->label = 'Associated Branch';
   9.     $associatedBranchField1->columntype = 'VARCHAR(100)';
   10.     $associatedBranchField1->uitype = 15;
   11.     $associatedBranchField1->typeofdata = 'M~O';
   12.     $infoBlock->addField($associatedBranchField1);
   13.     $associatedBranchField1->setPicklistValues(array('branch Kerala
   1','branch Kerala 2','branch Kerala 3'));
   14. }

- So in this Case i need 20 PICKLIST .. OHHH NO WAY....

   1. /*
   2.  * Field for Associated Branch
   3.  */
   4. $associatedBranchFieldN = Vtiger_Field::getInstance('branchN',$module)
   ;
   5. if (!$associatedBranchFieldN) {
   6.     $associatedBranchFieldN = new Vtiger_Field();
   7.     $associatedBranchFieldN->name = 'branch';
   8.     $associatedBranchFieldN->label = 'Associated Branch';
   9.     $associatedBranchFieldN->columntype = 'VARCHAR(100)';
   10.     $associatedBranchFieldN->uitype = 15;
   11.     $associatedBranchFieldN->typeofdata = 'M~O';
   12.     $infoBlock->addField($associatedBranchFieldN);
   13.     $associatedBranchFieldN->setPicklistValues(array('branch N','branch
   N','branch N'));
   14. }

-




On 22 March 2013 04:27, Richard Hills - TechnologyWise <richard at tw.co.nz>wrote:

>  Another + for keeping this. This feature is important to a number of our
> clients and is also used within our own organisation.
>
> Hope to see this one stay.
>
>
> On 22/03/13 07:51, Joe Bordes wrote:
>
> FWIW, I vote for keeping it. It shouldn't be eliminated
>
> Joe
> Tsolucio
>
> Doug <sailsfast at gmail.com> <sailsfast at gmail.com> escribió:
>>
>> Hey, I don't know if someone happened to mention this..
>>
>> But maybe a database cache might be a fix for this problem.  :-)
>>
>> It seems like it might be easier to fix the problem than to provide a
>> migration path to 6.0 for everyone who has used a role based pick list...
>> Like possibly everyone who has edited pick lists via the Module Manager
>>  On 21/03/13 14:26, Doug wrote:
>>
>>> It seems that it is a huge performance issue.
>>>
>>> Check out Allen's earlier post about performance issues related to the
>>> feature.
>>>
>>
>> It is, but do bear in mind that that was a module that had ~50 role-based
>> picklist fields alone! The customer added them via the Module Manager so
>> they will *always* be type 15 (role based). Some of them had almost 100
>> values too!
>>
>> It seems to me from the comments so far, that it might be preferable to
>> support the creation of *either* type of picklist in the Module Manager and
>> explain the pros & cons of each.
>>
>> And of course, use a database cache ;-)
>>
>>
>> Al
>>
>>
>>
>>
>> _______________________________________________
>> http://www.vtiger.com/
>>
>> ------------------------------
>> http://www.vtiger.com/
>>
>>
> --
> Enviado desde mi tablet BQEdison con K-9 Mail.
>
> _______________________________________________http://www.vtiger.com/
>
>
>
> --
> Richard Hills
> TechnologyWise Ltd
> www.technologywise.co.nz
> PO Box 2228, Tauranga, NZ
> ph: +64 (0)7 571 1060 | fax: +64 (0)7 571 1061
>
>
> _______________________________________________
> http://www.vtiger.com/
>



-- 
Muhammed Abdul Salim
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20130322/ade7a58c/attachment-0001.html>


More information about the vtigercrm-developers mailing list