Results 1 to 4 of 4

Thread: Export email from custom module?

  1. #1
    joeicooper is offline Sugar Community Member
    Join Date
    Apr 2008
    Posts
    24

    Default Export email from custom module?

    I've created a custom "person" module. I can't seem to find a way to export email out of the module. Any ideas?

    Running Sugar CE 6.2.4

    Thanks,

    Joe

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

    Default Re: Export email from custom module?

    You must write an own create_export_query in your custom module.
    Just look to modules/Contacts/Contact.php for a template.
    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


  3. #3
    joeicooper is offline Sugar Community Member
    Join Date
    Apr 2008
    Posts
    24

    Default Re: Export email from custom module?

    I was able to find a small code snippet for SugarBean.php in a bug that was created for Sugar 5.2

    SugarCRM Bug Tracker | Open Source Business & Social CRM - SugarCRM

    // begin andopes change: adding fix for bug 25723
    if(isset($this->field_defs['email1'])) {
    $ret_array['select'].= " ,email_addresses.email_address email1";
    $ret_array['from'].= " LEFT JOIN email_addr_bean_rel on {$this->table_name}.id = email_addr_bean_rel.bean_id and email_addr_bean_rel.bean_module='{$this->module_dir}' and email_addr_bean_rel.deleted=0 and email_addr_bean_rel.primary_address=1 LEFT JOIN email_addresses on email_addresses.id = email_addr_bean_rel.email_address_id ";
    }
    // end andopes change: adding fix for bug 25723

    Plugging this snippet in in the current SugarBean.php worked perfectly. Take a look at that bug and you'll see where to plug that small snippet in. This global fix will work with any of the custom modules that you've created. I think this should really find it's way into the release cycle. It's a problem that's existed for years.

    Thanks, Andopes for your excellent work!

  4. #4
    christianknoll's Avatar
    christianknoll is offline Sugar Community Member
    Join Date
    Nov 2008
    Location
    Vienna
    Posts
    939

    Default Re: Export email from custom module?

    If a report is fine install our free KINAMU reporter, create a simple report with the email address in and export it.

    regards, christian.

    Quote Originally Posted by joeicooper View Post
    I've created a custom "person" module. I can't seem to find a way to export email out of the module. Any ideas?

    Running Sugar CE 6.2.4

    Thanks,

    Joe

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. export of custom module
    By neel1154 in forum Developer Help
    Replies: 0
    Last Post: 2011-09-24, 08:10 AM
  2. Make custom export from Custom Module
    By abocanegrab in forum Help
    Replies: 1
    Last Post: 2010-12-06, 03:57 PM
  3. Custom Module Won't Export
    By zlinedavid in forum Help
    Replies: 9
    Last Post: 2010-05-08, 08:02 PM
  4. Customize CSV Export from A Custom Module
    By freedbill in forum Developer Help
    Replies: 0
    Last Post: 2010-04-22, 12:03 PM
  5. Replies: 0
    Last Post: 2009-09-17, 12:40 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
  •