Looking for help - Email links in Subpanels open empty email compose window

Everyone,

I’ve created an issue in Github, https://github.com/salesagility/SuiteCRM/issues/5955

Currently, when clicking an email address in the Contacts subpanel, the compose window is empty. The email is not associated with the record, and the ‘To:’ field is not filled in. There’s a lot more detail posted in the issue. The code that creates the link is in the populateComposeViewFields function from modules/Emails/EmailUI.php

I’m trying to fix this, so that clicking a link in the subpanel associates the email with the current record. It looks like it’s currently trying to associate it with the contact, and failing.

If anyone has experience with this area of the codebase and can help me out, it would be much appreciated.

I’ve written a fix for the issue, and after testing we’re using it in production. I’d appreciate some more eyes on it to point out any issues. The code can be found here: https://github.com/ApatheticCosmos/SuiteCRM/commit/d241488d04b162e4774c97dd6426d9a46aae78aa

It turns out the populateComposeViewFields function was a red herring.

Hi Benjamin,

I think the best would be to have a core suitecrm dev have look at your code.
I’m not that familiar with the emails part.

Anyway, I think there is a bug on like 168

 if ( $('.email-relate-target'.length) ){

I guess it should be:

 if ( $('.email-relate-target').length ){

Sorry for the delay in the reply and for not being of much of a help.

1 Like

I think you’re correct! It still works as it is, but it’s not proper. That is helpful! :slight_smile: