Hi All,
I want to have a custom filter search that displays record lists with last action like last Email and last Call. I would like to have the values Email and Call in a custom enum field.
I tried creating the file custom/Espo/Custom/Selectmanagers/Contact.php
<?php
namespace Espo\Custom\SelectManagers;
use Espo\Modules\Crm\SelectManagers\Contact as ContactCrm;
class Contact extends ContactCrm
{
protected function filterCustomEnum(&$result)
{
$result['customJoin'] .= " LEFT JOIN note AS notes ON contact.id = notes.parent_id AND notes.deleted = 0 ";
$this->addAndWhere(array(
'notes.type' => 'EmailSent'
), $result);
}
}
I get still get the whole collection. Im new to EspoCRM and still having hard time extending customs.
Anyone can enlighten me on this?
Thanks.
I want to have a custom filter search that displays record lists with last action like last Email and last Call. I would like to have the values Email and Call in a custom enum field.
I tried creating the file custom/Espo/Custom/Selectmanagers/Contact.php
<?php
namespace Espo\Custom\SelectManagers;
use Espo\Modules\Crm\SelectManagers\Contact as ContactCrm;
class Contact extends ContactCrm
{
protected function filterCustomEnum(&$result)
{
$result['customJoin'] .= " LEFT JOIN note AS notes ON contact.id = notes.parent_id AND notes.deleted = 0 ";
$this->addAndWhere(array(
'notes.type' => 'EmailSent'
), $result);
}
}
I get still get the whole collection. Im new to EspoCRM and still having hard time extending customs.
Anyone can enlighten me on this?
Thanks.
Comment