Results 1 to 2 of 2

Thread: question about Addemailaddress of contact modul

  1. #1
    amao is offline Member
    Join Date
    Jan 2009
    Posts
    12

    Default question about Addemailaddress of contact modul

    I want write a function just like the add Emailaddress of contact modul.
    Haven't read all the code of sugarcrm.

    The definition of this Email field in editviewdef.php is 'email1', which normally refer to the data field in database.
    This 'email1' indicate a including document from (include/SugarEmailAddress/templates/forEditView.tpl).

    I just can't figure out, how will it realized.
    Hope somebody could descript, how does it works.

  2. #2
    kuske's Avatar
    kuske is offline Sugar Community Member
    Join Date
    Oct 2007
    Location
    Germany
    Posts
    2,597

    Default Re: question about Addemailaddress of contact modul

    Since 5.0.0 Sugar saves the email addresses in an own database table (email_addresses) and any reference of an email address in another table (email_addr_bean_rel). So it should be shure that each email address is only stored once in email_addresses.

    If you have a contact this contact has one entry in email_addr_bean_rel for each of its email addresses ( possibly more than 2) with email_addr_bean_rel.bean_id = contacts.id and email_addr_bean_rel.bean_module ='Contacts'.

    These records have email_addr_bean_rel.email_address_ids pointing to email_addresses.id records with the Email Addresses.

    In 4.51 each contact could have only 2 emails email1 and email2.
    In 5.00 the new mechanism was realized and email1 and email2 were removed.
    As some custom code did not work after this change in 5.10 the fields email1 and email2 were reanimated and filled with primary email and an other email if available. But they are not stored back to the database !
    Harald Kuske
    Pre-Sales Engineer Central Europe

    SUGARCRM Deutschland GmbH
    Erika-Mann-Str. 53, 80636 Munich, Germany
    Email: hkuske@sugarcrm.com
    Home: http://www.sugarcrm.com


Thread Information

Users Browsing this Thread

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

Similar Threads

  1. View Contact and Accounts Question
    By ekolb in forum Help
    Replies: 2
    Last Post: 2009-07-17, 03:01 PM
  2. contact question
    By clynch in forum General Discussion
    Replies: 1
    Last Post: 2007-10-25, 03:05 AM
  3. Question on contact/lead history
    By topdown in forum General Discussion
    Replies: 0
    Last Post: 2006-06-12, 10:31 PM
  4. Question about Campaigns and Contact Exporting: Please Help!
    By mhan7474 in forum General Discussion
    Replies: 9
    Last Post: 2006-04-08, 05:11 AM
  5. Contact Module Question
    By johnnyeng in forum Help
    Replies: 0
    Last Post: 2006-03-29, 05:30 PM

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
  •