How to find duplicate email address when update contact module in record.js?

My goal is to make it impossible to add new email addresses when editing a contact, if they are already present in the system, as well as the impossibility of saving a contact if such an email address already exists. In other words, to exclude the appearance of duplicate email addresses. There is documentation here, but it doesn't work in my case. support.sugarcrm.com/.../

Parents
  • Hi

    I'm afraid it is a polemic approach once, by implementing such a request, users may not be able to convert Leads. Are you sure about that?

    Based on article you provided you need to customize the method _doValidateEmail in order to call a custom end point which would check for duplicates for a given email address which has not being saved yet.

    Regards

    André Lopes
    Lampada Global
    Skype: andre.lampada
  • I would think that one could still have a Lead Conversion process but have the process force the selection of the existing contact related to the lead's email address rather than presenting the end user with "Potential Duplicates" and "Ignore and Create".  Of course this would require a good degree of customization, but I think it's feasible. 

    Alternatively one could prevent Lead Conversion altogether by simply adding a field that indicates that the Lead is an "Existing Contact" and simply link the Lead to the corresponding Contact by default (lead logic hook).

    The user can still "work the Lead", but if an Opportunity needs to be created they can go to the corresponding Contact to work from there.

    I see how it could be a controversial decision, but one that could be supported if the business rules permit such an approach.

    Perhaps my view is simplified by the fact that we use Professional on-site, our leads are not linked directly to a Marketing platform (it's all custom) and we do not use Lead data directly for ROI calculations.

Reply
  • I would think that one could still have a Lead Conversion process but have the process force the selection of the existing contact related to the lead's email address rather than presenting the end user with "Potential Duplicates" and "Ignore and Create".  Of course this would require a good degree of customization, but I think it's feasible. 

    Alternatively one could prevent Lead Conversion altogether by simply adding a field that indicates that the Lead is an "Existing Contact" and simply link the Lead to the corresponding Contact by default (lead logic hook).

    The user can still "work the Lead", but if an Opportunity needs to be created they can go to the corresponding Contact to work from there.

    I see how it could be a controversial decision, but one that could be supported if the business rules permit such an approach.

    Perhaps my view is simplified by the fact that we use Professional on-site, our leads are not linked directly to a Marketing platform (it's all custom) and we do not use Lead data directly for ROI calculations.

Children
No Data