Results 1 to 2 of 2

Thread: DataBase Structure confused to write sync Cron

  1. #1
    Ubunter35's Avatar
    Ubunter35 is offline Sugar Community Member
    Join Date
    Jun 2010
    Location
    Madrid- Espaņa
    Posts
    19

    Exclamation DataBase Structure confused to write sync Cron

    Hello people,

    I'm not great in Sugar core, but I'm writing a small cron to dump and sync data into our existing SugarCrm, running v. 6.3, and a2billing.

    A2billing is a VOIP Telecom billing system written in php also.

    So, my idea it's to run a cron to sync a2billing accounts as lead in Sugar DB, but I arrive to the point, that in the leads table I don't find a field for email, so no idea where to dump the email field for the leads??

    Searching around, I found here, that the mail details is handled by the email_addresses table; but in this case what I should do, dump the mail address directly to that table?? But how related to the specific customer ??

    To be concrete, my question is, when I'm dumping details to the lead table, where should I dump the email for that lead, as the lead table don't see to have an email field? and if so, should I run internal sugar sync into leads table and emails to fix this?

    Help please to clarify me this...

    Regards,
    Softbrocker
    Used Software Licensing Business at softbrocker.com

    SipCel Telecom
    Voip for Business, Enterprise, Callcenters, and Wholesale Transit at sipcel.com

  2. #2
    Angel's Avatar
    Angel is offline Sugar Community Member
    Join Date
    Jul 2005
    Location
    Los Angeles
    Posts
    4,813

    Default Re: DataBase Structure confused to write sync Cron

    You shouldn't write directly to the database tables for this very reason.

    Use the SOAP or REST API to input the data. Through it you will access to the email1 and email2 fields which allow you to insert a primary and a single secondary email address for a Lead entry, without needing to know the database structure.

    Check out the developer site for more info on the API:

    Sugar Developer Zone - SugarCRM tutorials, SugarCRM Module Builder, SugarCRM documentation
    Regards,

    Angel Magaņa
    Co-Author: Implementing SugarCRM 5.x (Packt Publishing -- Sept. 2010)
    Blog: http://cheleguanaco.blogspot.com.
    Twitter: @cheleguanaco.

    ________
    | Projects: |_____________________________________
    |
    | CandyWrapper (.NET Wrapper for SugarCRM SOAP API). Source now available on GitHub!
    | GoldMine to SugarCRM Express Conversion. Latest: 1.0.1.7 (Nov. 3, 2009)
    | CRM SkyDialer (Skype Integration). Latest: 1.0.2 (Feb. 17, 2010)
    | Round Robin Leads Assignment
    | Phone Number Formatter
    | CaseTwit (Twitter Integration)
    ______________________________________________

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. What i need to write php.exe -f cron.php file?
    By ramji123 in forum Developer Help
    Replies: 5
    Last Post: 2009-11-19, 05:24 PM
  2. Database structure in pro version
    By DEA in forum General Discussion
    Replies: 1
    Last Post: 2009-05-17, 09:00 AM
  3. Database structure problems
    By hkphooey in forum Help
    Replies: 0
    Last Post: 2008-11-28, 09:09 AM
  4. How to newly write cron job in sugarcrm...?
    By maniram2202 in forum Developer Help
    Replies: 3
    Last Post: 2008-10-14, 03:21 PM
  5. Sugarcrm 4.5 Database Structure
    By aboo in forum Developer Help
    Replies: 3
    Last Post: 2007-01-16, 12:44 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •