Duplicated Leads | Community
Skip to main content
Maxwell_Obeng-Y
Level 2
August 14, 2019
Question

Duplicated Leads

  • August 14, 2019
  • 1 reply
  • 3575 views

Hi, I'm hoping someone can tell me if the following code could be the reason why our form would be firing twice and creating duplicate records in our instance? We implemented this a couple of months back on our BounceX pages. I'm trying to pin down what is causing duplicated leads through these forms. Thanks.

MktoForms2.loadForm("//app-abXX.marketo.com", "XXX-XXX-XXX", XXXX, function(form) {
form.onSubmit(function(){
var sEmail = form.vals().Email;
var chunks = sEmail.split('@');
var emaildomain = chunks[1];
form.vals({"Email":sEmail.toLowerCase(),"acbj_emailDomain__c":emaildomain.toLowerCase()});
});
});‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍
This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

1 reply

SanfordWhiteman
Level 10
August 14, 2019

Please highlight your code using the Advanced Editor's syntax highlighter and include a link to an example page so other code can be inspected.

Then we'll continue.

Maxwell_Obeng-Y
Level 2
August 15, 2019

Sure, thanks.

SanfordWhiteman
Level 10
August 15, 2019

There's no reason for that code alone to cause duplicates.  Please link to an example page.

(I would caution that you should be using toLocaleLowerCase(), or better yet not changing the case of the mailbox/left-hand-side at all.)