From f2d5eed7e3dc9edc37cbf35654114ad42e61abf7 Mon Sep 17 00:00:00 2001 From: yuri Date: Mon, 21 Nov 2016 10:26:27 +0200 Subject: [PATCH] company entity: check for duplicates --- application/Espo/Core/Templates/Services/Company.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/application/Espo/Core/Templates/Services/Company.php b/application/Espo/Core/Templates/Services/Company.php index 0b8dd61fa4..92c918a263 100644 --- a/application/Espo/Core/Templates/Services/Company.php +++ b/application/Espo/Core/Templates/Services/Company.php @@ -31,5 +31,10 @@ namespace Espo\Core\Templates\Services; class Company extends \Espo\Services\Record { - + protected function getDuplicateWhereClause(Entity $entity, $data = array()) + { + return array( + 'name' => $entity->get('name') + ); + } }