ten24/Slatwall — Issue #517: Proposed update to primary(email | phone | address) for accounts & vendors
Author: gregmoser
Created: 2012-01-05 18:34:03+00:00
State: open

I was thinking that the getPrimaryXXX() methods do logic like this:

public any function getPrimaryEmailAddress() {
if(!isNull(getPrimaryEmailAddress()) {
return getPrimaryEmailAddress();
} else if (arrayLen(getAccountEmailAddresses()) {
setPrimaryEmailAddress(getAccountEmailAddresses()[1]);
return getAccountEmailAddresses()[1];
} else {
return getService("accountService").newAccountEmailAddress();
}
}