From ea4532abbe5fbbea7421278b993dbfb22585f819 Mon Sep 17 00:00:00 2001 From: "j.buchanan" Date: Tue, 3 Sep 2024 16:08:54 +0100 Subject: [PATCH] Fix #10513 - When field to be updated is email1 then use new logic to update related email account record Load relationship and set email_address and email_address_caps --- Api/V8/Service/ModuleService.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Api/V8/Service/ModuleService.php b/Api/V8/Service/ModuleService.php index 7fb3cc19dd4..cdc2292afe8 100644 --- a/Api/V8/Service/ModuleService.php +++ b/Api/V8/Service/ModuleService.php @@ -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;