It calls:
Code:
GET /Activities/{parentType}/{id}/composeEmailAddressList
Opportunity behaves differently. Its clientDefs assign a custom Activities panel view:
Code:
crm:views/opportunity/record/panels/activities
For a custom entity, I would use the same limited pattern rather than copying the complete Opportunity controller and service:
1. Assign a custom Activities panel view to the entity through clientDefs.
2. Extend the standard CRM Activities panel view.
3. Override only the compose-email recipient logic.
4. Call a small custom backend endpoint that loads the linked Contact, checks ACL and email-field access, and returns the recipient in this format:
Code:
[
{
"emailAddress": "contact@example.com",
"name": "Contact Name"
}
]
Code:
Espo\Custom\Tools\CMyEntity\Service
Code:
custom/Espo/Custom/Tools/CMyEntity/Service.php namespace Espo\Custom\Tools\CMyEntity;
After adding the metadata and classes, rebuild EspoCRM before testing. This can be implemented as a small extension without modifying core files. If you prefer, we can also help you implement and package this recipient-selection behavior.

Leave a comment: