[Vtigercrm-developers] getting a list of products

Uma S uma.s at vtiger.com
Mon Mar 17 05:35:32 GMT 2014


Hi Chris,

Their is a way to achieve your requirement.

   1. Please create a filter with all custom-fields that you would like get
   in list-view.
   2. Now create a list-view model of a module (products), by passing
   moduleName and filter-id.
   3. Then on this list-view model you can call getListViewEntries() api to
   get entries of list-view with all custom fields.

Regards
Uma S
Vtiger Team


On Mon, Mar 17, 2014 at 4:32 AM, Hamono, Chris (DPC) <Chris.Hamono at sa.gov.au
> wrote:

> In answer to my own question.
>
>
>
> I don't know what the official ways is to get  a list including custom
> fields but this is what I have discovered...
>
>
>
> When a custom field is made it adds a new column to the table vtiger_
> Modulenamecf in my case vtiger_ productcf. The field name is something
> along the lines of cf_### where ### = some number, for me this was cf_716.
>
>
>
> This is recorded in the vtiger_fields  table, the important fields for my
> purpose are "column name" "tablename" and "fieldlabel" these contain the
> information required to map the mysterious cf_### column name to the custom
> field.
>
>
>
> I assume there is a method that will do all of this for you but as far as
> I can find to get a list of products I will have to find all the custom
> fields using vtiger_fields manually build a sql statement to include those
> fields and then run that query.
>
>
>
>
>
> Chris
>
>
>
>
>
>
>
> *From:* vtigercrm-developers-bounces at lists.vtigercrm.com [mailto:
> vtigercrm-developers-bounces at lists.vtigercrm.com] *On Behalf Of *Hamono,
> Chris (DPC)
> *Sent:* Friday, 14 March 2014 11:26 AM
> *To:* vtigercrm-developers at lists.vtigercrm.com
> *Subject:* [Vtigercrm-developers] getting a list of products
>
>
>
> Hi All
>
>
>
> I am hoping someone can help me
>
>
>
> I am developing a module to integrate vtiger with drupal for a bespoke
> system. I have a need to get a list of products complete with custom
> fields. I also need to filter this list by range (limit) and by product type
>
>
>
> What is the recommended way to query a module for a list. I have tried to
> look through the source code but its very obtuse and haven't yet found what
> I need.
>
>
>
> Any assistance would be appreciated
>
>
>
> Chris
>
>
>
>
>
>
>
> _______________________________________________
> http://www.vtiger.com/
>



-- 
With
Best Regards
Uma.S
Vtiger Team
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20140317/6d353d5d/attachment-0001.html>


More information about the vtigercrm-developers mailing list