Skip to content

Commit

Permalink
Fix salesagility#10513 - When field to be updated is email1 then use …
Browse files Browse the repository at this point in the history
…new logic to update related email account record

Load relationship and set email_address and email_address_caps
  • Loading branch information
JackBuchanan authored and jack7anderson7 committed Nov 7, 2024
1 parent 1a114a9 commit 17ad5e7
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions Api/V8/Service/ModuleService.php
Original file line number Diff line number Diff line change
Expand Up @@ -473,6 +473,14 @@ protected function processAttributes(&$bean, $attributes)
} elseif ($property === 'filename') {
$createFile = true;
continue;

} elseif ($property === 'email1') {
foreach ($bean->emailAddress->addresses as $index => $email) {
if ($email['email_address'] === $bean->$property) {
$bean->emailAddress->addresses[$index]['email_address'] = $value;
$bean->emailAddress->addresses[$index]['email_address_caps'] = strtoupper($value);
}
}
}

$bean->$property = $value;
Expand Down

0 comments on commit 17ad5e7

Please sign in to comment.