Relate Field is updated with Logic Hook according to log, but is not actually updated

I'm trying to update the relate field in in bene_beneficiaries with what is in the relate field on the related accts_financial_accounts record. The log is showing that the values I want in the field are there both at the end of the before_save hook and in the after_save hook. However the field I want updated on the bene_beneficiaries record is not updated.

What could be the problem?

This...

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
<?php
if (!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
class PopulateFieldsLogicHook
{
public function populateFields($bean, $event, $arguments)
{
// Load the related accts_Financial_Accounts record
$bean->load_relationship('bene_beneficiaries_accts_financial_accounts');
$relatedAccounts = $bean->bene_beneficiaries_accts_financial_accounts->getBeans();
$financialAccountBean = array_shift($relatedAccounts);
if ($financialAccountBean) {
// Set the bene_Beneficiaries fields based on the related accts_Financial_Accounts record
$bean->account_registration_type = $financialAccountBean->account_registration_type_c;
$bean->bene_beneficiaries_accountsaccounts_ida = $financialAccountBean->accts_financial_accounts_accountsaccounts_ida;
$bean->bene_beneficiaries_accounts_name = $financialAccountBean->accts_financial_accounts_accounts_name;
}
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Returns this in the log...

Mon Oct 30 19:54:32 2023 [3950][1][FATAL] Field values before save: Array
(
[bene_beneficiaries_accountsaccounts_ida] => e400f6xx-7893-11e8-a344-02fd0a47dd48
[bene_beneficiaries_accounts_name] => Zxxx, Christine B.
)

Mon Oct 30 19:54:32 2023 [3950][1][FATAL] Field values after save: Array
(
[bene_beneficiaries_accountsaccounts_ida] => e400f6xx-7893-11e8-a344-02fd0a47dd48
[bene_beneficiaries_accounts_name] => Zxxx, Christine B.
)