From 17ad5e751019686ad7c46a1d2dc9338f6ce4c596 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..b3ee99cd185 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;