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/.../

  • 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
  • Hello André Lopes.
    I am confident in this task, we do not have converting leads into contacts, we create contacts directly by api, and there is a duplicate search. In my case, I want to prevent the presence of duplicate email addresses in the system when editing contacts.