I'm trying to create a custom DuplicateWhereBuilders class.
I created the class file at custom/Espo/Custom/Classes/DuplicateWhereBuilders/Account.php. The class looks like this:
Then I added the following to custom/Espo/Custom/Resources/metadata/recordDefs/Account.json:
However, when I try to save an Account record, it displays a 500 error and I see the following in my log:
Why isn't it finding the class?
I created the class file at custom/Espo/Custom/Classes/DuplicateWhereBuilders/Account.php. The class looks like this:
PHP Code:
<?php
namespace Espo\Custom\Classes\DuplicateWhereBuilders;
use Espo\Core\Duplicate\WhereBuilder;
use Espo\ORM\Query\Part\Condition as Cond;
use Espo\ORM\Query\Part\WhereItem;
use Espo\ORM\Query\Part\Where\OrGroup;
use Espo\ORM\Entity;
class Account implements WhereBuilder
{
public function build(Entity $entity): ?WhereItem
{...
Then I added the following to custom/Espo/Custom/Resources/metadata/recordDefs/Account.json:
Code:
{ "duplicateWhereBuilderClassName": "Espo\\Custom\\Classes\\DuplicateWhereBuilders\\Account" }
Code:
ERROR: (0) InjectableFactory: Class 'Espo\Custom\Classes\DuplicateWhereBuilders\Account ' does not exist.; PUT /Account/664b9c24abc46dc7a; line: 165, file: /usr/local/lsws/sites/crm.clinicalmatchme.com/application/Espo/Core/InjectableFactory.php
Comment