[Vtigercrm-developers] block, tab and field id numbers
Joe Bordes
joe at tsolucio.com
Sun Sep 17 16:09:13 PDT 2006
Hi,
I finally got a moment to read and understand this email. I also updated
some wiki pages with it.
>From what I understand there is no official way of obtaining a
tabid/blockid with which I can work without worrying of clashing with
somebody elses. So why isn't there a tab_seq and block_seq table so we
could use the getUniqueID when inserting records in these tables as we
do with vtiger_fields?
Thanks for your answer.
Regards, Joe
El vie, 08-09-2006 a las 03:17 -0700, Mangai escribió:
> Dear joebordes,
>
> I apologize for delay in reply.
>
> Here is the information you requested:
>
> Following changes should be done in
> modules/Users/DefaultDataPopulator.php files.
>
> 1) To insert into vtiger_tab table
> use value greater than 29 for tabid. values from 1 to 29 already
> occupied for modules in vtigerCRM.
> Syntax: $this->db->query("INSERT INTO vtiger_tab VALUES
> (<tabid>,'<name>',<presence>,<tabsequence>,'<tablabel>',<modifiedby>,<modifiedtime>,<customized>)");
>
> Example: $this->db->query("INSERT INTO vtiger_tab VALUES
> (7,'Leads',0,4,'Leads',null,null,1)");
> [example given with respect to Leads module.]
>
> 2) To insert into vtiger_blocks table
> use value greater than 83 for blockid. values from 1 to 83 are
> already occupied.
> Syntax: $this->db->query("insert into vtiger_blocks values
>
> (<blockid>,<tabid>,'<blocklabel>',<sequence>,<show_title
> >,<visible>,<create_view>,<edit_view>,<detail_view>)");
>
> Example: $this->db->query("insert into vtiger_blocks values
> (13,7,'LBL_LEAD_INFORMATION',1,0,0,0,0,0)");
>
> 3) To insert into vtiger_field table
> value for fieldid will be generated dynamically using getUniqueID
> method of PearDataBase class.
> Syntax: $this->db->query("insert into vtiger_field values
>
> (<tabid>,<fieldid>,<columnname>,<tablename>,<generatedtype>,<uitype>,<fieldname>,<fieldlabel>,
>
> <readonly>,<presence>,<selected>,<maximumlength>,<sequence>,<block>,<displaytype>,<typeofdata >,
> <quickcreate>,<quickcreatesequence>,<info_type>)");
>
> Example: $this->db->query("insert into vtiger_field values
>
> (7,".$this->db->getUniqueID("vtiger_field").",'salutation','vtiger_leaddetails',1,'55','salutationtype',
>
> 'Salutation',1,0,0,100,1,13,3,'V~O',1,null,'BAS')");
>
>
> This is a small part in module creation. As you asked about block,tab
> and field id, I've given that. kindly wait for some time to get full
> documentation for module creation. We will provide it soon.
>
> If you have any query or any difficulty in the above statements,
> kindly feel free to mail me(email address: minnie at vtiger.com)
>
> Thanks & Regards,
> Minnie.
>
> ---- On Thu, 07 Sep 2006 Joe Bordes <joe at tsolucio.com> wrote ----
>
> Hi All,
>
> I asked a question on the forum a few days ago but nobody
> answered. The
> thread is:
>
> http://forums.vtiger.com/viewtopic.php?t=9516
>
> It is about what numbers I should use when adding
> vtiger_block,
> vtiger_tab and vtiger_field. Do I just invent whatever numbers
> I want
> and hope they don't clobber/get clobberd? Or is there
> somewhere I can
> get my own "reserved" numbers?
>
> I'm asking because I just let out a patch to a project on the
> forge that
> has this problem. Or I make an install script for the project
> and
> generate te numbers dinamically so they can adapt to each
> installation
> or I used some reserved numbers.
>
> Please put me in the right direction.
>
> Thanks, Joe.
>
> BTW: If anybody has some time to test the project, all
> feedback is
> welcome (tsolucio::tttimecards).
>
> _______________________________________________
> Get started with creating presentations online -
> http://zohoshow.com?vt
>
> _______________________________________________
> Get started with creating presentations online - http://zohoshow.com?vt
More information about the vtigercrm-developers
mailing list