Announcement

Collapse
No announcement yet.

How do I get the LeadId Contact Hook after converting lead to Contact?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • How do I get the LeadId Contact Hook after converting lead to Contact?

    I created a hook on contact with method before/afterSave and I want to get the leadId after I converting the Lead to Contact but when I try to get it using $entity->get('originalLeadId')
    it seems empty

    PHP Code:
    namespace Espo\Modules\Extension\Hooks\Contact;

    use Espo\ORM\Entity;

    class LeadToContactHook

    public function afterSave(Entity $entity, array $options) :void
    {
    error_log($entity->get('originalLeadId'));
    }​​
Working...
X