SuiteCRM 7.13 - Inline Edit Not Working for Email in Leads Module

Hi All,

I’ve identified and resolved an issue with the inline edit functionality for email addresses in the Leads module of SuiteCRM 7.13. The problem was due to the needsToParseLegacyAddresses function in include/SugarEmailAddress/SugarEmailAddress.php not properly handling the email field during inline edits.

Solution:

I modified the needsToParseLegacyAddresses function at line 236 by adding a condition to ensure the email field is correctly processed during inline editing:

private function needsToParseLegacyAddresses($bean)
{
    if (
        !isset($_REQUEST)
        || !isset($_REQUEST[$bean->module_dir . '_email_widget_id'])
        || !isset($_REQUEST['massupdate'])
    ) {
        if (empty($this->addresses) || !empty($bean->email1)) {
            // existing code...
        }
    }
    // existing code...
}

This adjustment ensures that when the email1 field is not empty, the inline edit functionality operates as expected.

I hope this solution is helpful to others facing the same issue.

Hi, welcome to the Community! :tada:

Thanks for that fix. If you want, this is open-source, you can contribute your fix on Github for everyone.

But before that, I am wondering about that needsToParseLegacyAddresses function… it doesn’t return anything…

I asked an artificial friend about this and this is what he kindly responded.

Although that would have to be checked, I am not sure that suggestion fits what the original author intended…

Hi there! :tada:

Thanks for sharing this. You’re right about the needsToParseLegacyAddresses function; it doesn’t explicitly return anything, which means it likely operates by the side effects (e.g., modifying $this->addresses).

1 Like