Hi
I need to allow recording of repeated leads, I'm getting errors like
Integrity constraint violation: 1062 Duplicate entry or duplicate data;
there is only rule I need is not to allow if there is already some lead like same email;
I've been trying:
Or
protected function getDuplicateWhereClause(Entity $entity, $data = array())
{
$data = array(
'OR' => array()
);
if ($entity->get('emailAddress')) {
$data['OR'][] = array(
'emailAddress' => $entity->get('emailAddress'),
);
}
But but I still got problem, can you help me
Thanks
I need to allow recording of repeated leads, I'm getting errors like
Integrity constraint violation: 1062 Duplicate entry or duplicate data;
there is only rule I need is not to allow if there is already some lead like same email;
I've been trying:
Or
protected function getDuplicateWhereClause(Entity $entity, $data = array())
{
$data = array(
'OR' => array()
);
if ($entity->get('emailAddress')) {
$data['OR'][] = array(
'emailAddress' => $entity->get('emailAddress'),
);
}
But but I still got problem, can you help me
Thanks
Comment