Hi,
We installed this following code under custom folder to check for duplicate record:
This code works when we create the entity record online but does not seem to work when the record is created using Workflow. This is the workflow definition (the entity name field = Bill/Cover No. field in Workflow. Appreciate any help, please.
We installed this following code under custom folder to check for duplicate record:
HTML Code:
<?php
namespace Espo\Custom\Services;
use \Espo\ORM\Entity;
class Billrecord extends \Espo\Core\Templates\Services\BasePlus
{
protected function getDuplicateWhereClause(Entity $entity, $data)
{
if (!$entity->get('name')) {
return false;
}
return [
'name' => $entity->get('name')
];
}
}
Comment