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 Tevfik Tümer

                    I have gone through /<>/modules/Leads/clients/base/layouts/convert-panel/convert-panel.js

    and found out that the onclicking the associate button it is going to this function handleAssociateClick.

    It is in this function that i want to do the duplicate check.

    convertPanelEvents['click [name="associate_button"]'] = 'handleAssociateClick';

    handleAssociateClick: function(event) {

            if (!$(event.currentTarget).hasClass('disabled')) {

                if (this.currentToggle === this.TOGGLE_CREATE) {

                    this.runCreateValidation();

                } else {

                    this.markPanelComplete(this.duplicateView.context.get('selection_model'));

                }

            }

            event.stopPropagation();

        },

  • Hi sidhu,

    I've tried to understand your approach but couldn't get it. So, If i answer your question regardlessly your use case,

    you need to duplicate modules/Leads/clients/base/layouts/convert-panel/convert-panel.js to custom folder like; custom/modules/Leads/clients/base/layouts/convert-panel/convert-panel.js

    and modify handleAssociateClick function like you said.

    If you wanna make a duplication check all you need to do call;

    this.renderDupeCheckList()
    

    Best Regards

    Tevfik Tümer

    Developer Support Engineer

  • Hi Tevfik Tümer

                      I have tried this but it dint work out.

    I worked around the below code and it rendered already existing duplicate check that comes on rendering the panels during lead conversion

    handleAssociateClick: function(event) {

      this.dupecheckList = app.view.createLayout({

                    context: this.duplicateView.context,// i need this to happen for the new account i am creating

                    name: 'create-dupecheck',

                    module: "Accounts"

                });

                this.addComponent(this.dupecheckList);

Reply
  • Hi Tevfik Tümer

                      I have tried this but it dint work out.

    I worked around the below code and it rendered already existing duplicate check that comes on rendering the panels during lead conversion

    handleAssociateClick: function(event) {

      this.dupecheckList = app.view.createLayout({

                    context: this.duplicateView.context,// i need this to happen for the new account i am creating

                    name: 'create-dupecheck',

                    module: "Accounts"

                });

                this.addComponent(this.dupecheckList);

Children
No Data