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

Mangai minnie at vtiger.com
Sun Sep 3 23:38:49 PDT 2006


Dear DG,

        Thank you for giving an opportunity to service you.

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

$this->db->query("insertinto 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. 

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

Thanks & Regards,
Minnie.   


---- On Fri, 01 Sep 2006 Dennis Grant <dgrant at accuratetechnologies.com> wrote ---- 

As part of my project to port the featuresfrom our fork of V4.2 to V5.0, I find I need to add some new fields to variousmodules.
 
What I did in my fork (brace yourselves,this is horribly ugly) was to create the new fields as a custom field, and thenhardcode the name of the custom field into whatever module needed that info.
 
That works for a local fork, but it isutterly unacceptable for anything I want to have incorporated into the main vTigertrunk – not to mention that it’s just ugly hackery.
 
So then, assume I want to add a new fieldto a Quote; a checkbox Boolean value.
 
I know the field must be added to thedatabase schema; I know how to do that.
 
But where is the proper place to add thisfield so that it shows up in the “Quote Information” block on DetailView andEditView?
 
I’d really appreciate a little help here.
 
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/20060903/1ccd72de/attachment-0004.html 


More information about the vtigercrm-developers mailing list