[Vtigercrm-developers] How to add a new field to a Module?

Gopal gopals at vtiger.com
Tue Sep 5 19:55:22 PDT 2006


Hi,

It is a wonderful idea.

Please have a look at the "Developer Guide" in vtiger Wiki:

http://wiki.vtiger.com/index.php/Vtiger_CRM_5_Developer_Guide

So far I have added articles on creating dashboards, related lists, language packs. Thanks to Michel Jacquemes and Richie for their valuable contributions. 

By the way, I have also contributed one of the articles :-)  

Currently I am working with Minnie on "how to create a module in vtiger CRM 5?" article, which will open doors for new developers.

Regards,
Gopal

---
S.S.G.Gopal
skype: sripadag
ph: +1 877 788 4437
blog: http://gopal.vtiger.com




---- On Tue, 05 Sep 2006 Dennis Grant <dgrant at accuratetechnologies.com> wrote ---- 

> Dear DG,

> Thank you for giving an opportunity to service you.

Heh. :)

The vTiger core team is in India, right? So English is probably a second language for a lot of the team.

Just FYI, "to service someone" is not the same thing as "to serve someone".

The correct phrase would be "Thank you for giving us an opportunity to serve you." Or, less formally (given that this is a developers' list and we're all peers here) "Here is the information you requested:"

I'm not giving you a hard time; you just might want to avoid using a phrase that implies a much more... intimate... relationship than perhaps you wanted. :) :)  

> In vtigerCRM5RC, For 'Quote Information' blockid is 51 and  tabid is 20. 
> you have to write an insert query for each field in 
> 'modules/Users/DefaultDataPopulator.php' file under //Block51. for eg: 
> take some field say XYZ, the query is given below

OK, two quick questions: 

1) What do "blockID" and "tabID" represent?

2) What is the process for registering new blockids and tabids?

> $this->db->query("insert into vtiger_field values (20,".$this->db-
> >getUniqueID("vtiger_field").",'xyz','vtiger_quotes',
> 1,'2','xyz','XYZ',1,0,0,100,1,51,1,'V~M',1,null,'BAS')");

> In that query, you have take care of each field value. This entry is 
> applicable for both editview and detailview. 

OK, so looking at the table description:

+---------------------+--------------+------+-----+---------+
| Field               | Type         | Null | Key | Default |
+---------------------+--------------+------+-----+---------+
| tabid               | int(19)      | NO   | MUL |         |                
| fieldid             | int(19)      | NO   | PRI | NULL    |
| columnname          | varchar(30)  | NO   |     |         |                
| tablename           | varchar(50)  | NO   |     |         |                
| generatedtype       | int(19)      | NO   |     | 0       |                
| uitype              | varchar(30)  | NO   |     |         |                
| fieldname           | varchar(50)  | NO   | MUL |         |                
| fieldlabel          | varchar(50)  | NO   |     |         |                
| readonly            | int(1)       | NO   |     |         |                
| presence            | int(19)      | NO   |     | 1       |                
| selected            | int(1)       | NO   |     |         |                
| maximumlength       | int(19)      | YES  |     | NULL    |                
| sequence            | int(19)      | YES  |     | NULL    |                
| block               | int(19)      | YES  | MUL | NULL    |                
| displaytype         | int(19)      | YES  | MUL | NULL    |                
| typeofdata          | varchar(100) | YES  |     | NULL    |                
| quickcreate         | int(10)      | NO   |     | 1       |                
| quickcreatesequence | int(19)      | YES  |     | NULL    |                
| info_type           | varchar(20)  | YES  |     | NULL    |                
+---------------------+--------------+------+-----+---------+

You did:

tabid = 20
fieldid = ".$this->db->getUniqueID("vtiger_field")."
columnname = 'xyz'
tablename = 'vtiger_quotes'
generatedtype = 1
uitype = '2'
fieldname = 'xyz'
fieldlabel = 'XYZ'
readonly = 1
presence = 0
selected = 0
maximumlength = 100
sequence = 1
block = 51
displaytype = 1
typeofdata = 'V~M'
quickcreate = 1
quickcreatesequence = NULL
info_type = 'BAS'

Could you please break these down into what they mean, and (especially for items like uitype) the allowed values and what the values mean?

When is /Users/DefaultDataPopulator.php executed?

> I hope this helps you. kindly contact me for further clarifictaions.

It's a good start - it is nice that vTiger is making a much better effort to work with downstream developers these days; thank you for that.

Is there a Wiki somewhere where we should be capturing this conversation?

DG 

_______________________________________________
Get started with creating presentations online - http://zohoshow.com?vt
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20060905/16600072/attachment-0004.html 


More information about the vtigercrm-developers mailing list