Announcement

Collapse
No announcement yet.

DuplicateWhereBuilders Class Does Not Exist

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

  • DuplicateWhereBuilders Class Does Not Exist

    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:

    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"
    }
    However, when I try to save an Account record, it displays a 500 error and I see the following in my log:

    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
    Why isn't it finding the class?​

  • #2
    Extra hidden character in the end of the class name ?

    Comment


    • #3
      Yes, that was it! Thank you so much for your prompt and helpful response. Not only is EspoCRM the best CRM on the market, but the support in this forum is equally amazing.

      Comment

      Working...
      X