email to case: lead parent to case
This commit is contained in:
@@ -35,6 +35,7 @@ use Espo\Entities\Email;
|
||||
use Espo\Modules\Crm\Entities\Account;
|
||||
use Espo\Modules\Crm\Entities\CaseObj;
|
||||
use Espo\Modules\Crm\Entities\Contact;
|
||||
use Espo\Modules\Crm\Entities\Lead;
|
||||
use Espo\ORM\Entity;
|
||||
use Espo\ORM\EntityManager;
|
||||
|
||||
@@ -66,7 +67,11 @@ class AfterCreate implements SaveHook
|
||||
|
||||
if (
|
||||
$email->getParentId() &&
|
||||
!in_array($email->getParentType(), [Account::ENTITY_TYPE, Contact::ENTITY_TYPE])
|
||||
!in_array($email->getParentType(), [
|
||||
Account::ENTITY_TYPE,
|
||||
Contact::ENTITY_TYPE,
|
||||
Lead::ENTITY_TYPE,
|
||||
])
|
||||
) {
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user