Duplicate Check on clicking associate button on 'Leads to Account Conversion Panel'

Hi All

           I want the duplicate check to be performed when the user clicks the associate button in the leads to accounts conversion panel.

/<>/modules/Leads/clients/base/layouts/convert-panel/convert-panel.js

          I have been working around this file but dint seem to progress.

Regard

Sidhu Tevfik Tümer

Parents
  • Hi sidhu,

    There is already a duplication check out of box when you are creating an account while converting a Lead.

    Best Regards

    Tevfik Tümer

    Developer Support Engineer

  • Hi sidhu sidhu

    For Duplicate Check on Conversion Lead to do is

    All we need to do is in custom/modules/Leads/clients/base/layouts/convert-panel/convert-panel.js ( if file is not there then copy it from modules/Leads/clients/base/layouts/convert-panel/convert-panel.js)

    Under runCreateValidation function inside isValid add following lines

      this.addDupeCheckComponent();

      if(this.triggerDuplicateCheck()){

      console.log("duplicates found");

      }else{

      console.log("no duplicates found");

      this.markPanelComplete(model);

      }

    For Checking additional Validation to do is

    All we need to do is in custom/modules/Leads/clients/base/layouts/convert-panel/convert-panel.js ( if file is not there then copy it from modules/Leads/clients/base/layouts/convert-panel/convert-panel.js)

    Under runCreateValidation function add :

    model.addValidationTask('check_vat_c', _.bind(function(fields, errors, callback) {

    // Write your validation logic here

    // Example for field should not be empty

    if (_.isEmpty(model.get('your-field-name')))

      {

      errors['your-field-name'] = errors['your-field-name'] || {};

      errors['your-field-name'].required = true;

      }

      callback(null, fields, errors);

      }, this));

    Hope this Helps

    Best Regards

    S Ramana Raju

Reply
  • Hi sidhu sidhu

    For Duplicate Check on Conversion Lead to do is

    All we need to do is in custom/modules/Leads/clients/base/layouts/convert-panel/convert-panel.js ( if file is not there then copy it from modules/Leads/clients/base/layouts/convert-panel/convert-panel.js)

    Under runCreateValidation function inside isValid add following lines

      this.addDupeCheckComponent();

      if(this.triggerDuplicateCheck()){

      console.log("duplicates found");

      }else{

      console.log("no duplicates found");

      this.markPanelComplete(model);

      }

    For Checking additional Validation to do is

    All we need to do is in custom/modules/Leads/clients/base/layouts/convert-panel/convert-panel.js ( if file is not there then copy it from modules/Leads/clients/base/layouts/convert-panel/convert-panel.js)

    Under runCreateValidation function add :

    model.addValidationTask('check_vat_c', _.bind(function(fields, errors, callback) {

    // Write your validation logic here

    // Example for field should not be empty

    if (_.isEmpty(model.get('your-field-name')))

      {

      errors['your-field-name'] = errors['your-field-name'] || {};

      errors['your-field-name'].required = true;

      }

      callback(null, fields, errors);

      }, this));

    Hope this Helps

    Best Regards

    S Ramana Raju

Children
No Data