[Vtigercrm-developers] getting a list of products

Hamono, Chris (DPC) Chris.Hamono at sa.gov.au
Sun Mar 16 23:02:25 GMT 2014


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



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20140317/d7bb1a75/attachment.html>


More information about the vtigercrm-developers mailing list