DuplicateWhereBuilders Class Does Not Exist

Collapse
X
 
  • Time
  • Show
Clear All
new posts

  • SoBeGuy
    replied
    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.

    Leave a comment:


  • yuri
    replied
    Extra hidden character in the end of the class name ?

    Leave a comment:


  • SoBeGuy
    started a topic DuplicateWhereBuilders Class Does Not Exist

    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?​
Working...