AnsweredAssumed Answered

Saving an Account Bean clears Email Addresses

Question asked by martin martin on Jul 26, 2014
Latest reply on Oct 10, 2014 by Aroddo Aroddo

I have done extensive research into this problem, and I just can't figure it out.

I'm syncing data automatically at a set schedule from another system.  It syncs Accounts and related Email Addresses.

The problem is, when I save the Account bean, it clears all related email addresses by marking deleted=1 in email_addr_bean_rel table.

Even if I just run this simple code below, it will always clear the oldest email address relationship.  The email address table: email_addresses isn't affected.

$CUSTNMBR = 'MA199';
$bean = new Account();
$bean->retrieve_by_string_fields(array('customercode_c' => $CUSTNMBR));
Any help is greatly appreciated, I've been working on this for a while now.