Results 1 to 2 of 2

Thread: Drop email address of a bean

  1. #1
    lrgervais Guest

    Default Drop email address of a bean

    Hello to everyone

    is there anyway in sugar to drop the email addresses of a bean(Contacts)?
    so far i know it is possible to add some email address to a bean, i would like to drop them all.

    Can anyone please help me?

    best regards,

    Stev

  2. #2
    cmourizard's Avatar
    cmourizard is offline Sugar Community Member
    Join Date
    Oct 2007
    Posts
    176

    Default Re: Drop email address of a bean

    Hello,

    Can you try something like that:

    PHP Code:
    $contactId 'xxx-xx-xxxx-xxx';
    $contact BeanFactory::getBean('Contacts'$contactId);
    $contact->emailAddress->addresses = array();
    $contact->emailAddress->save($contact->id$contact->module_dir); 
    @cedricmourizard on Twitter
    SYNOLIA
    Oldest SugarCRM partner in the world and Gold Partner / Partenaire GOLD SugarCRM
    Official French Translator / Responsable de la traduction Française

    51 Avenue Jean Jaurès - 69007 LYON - FRANCE - Tel : +33 4 27 70 53 70
    www.synolia.com | @synolia sur Twitter
    www.crm-france.com | Forum CRM-France

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 0
    Last Post: 2012-05-11, 07:26 PM
  2. Replies: 1
    Last Post: 2010-08-10, 03:48 PM
  3. Retrieve email address from case bean
    By milescook in forum Developer Help
    Replies: 1
    Last Post: 2009-03-06, 12:27 PM
  4. Have Email Address save on bean save
    By eggsurplus in forum Feature Requests
    Replies: 1
    Last Post: 2008-09-12, 04:16 PM
  5. Replies: 5
    Last Post: 2008-07-09, 03:53 AM

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
  •