You need to sign in to do that
Don't have an account?
![Lindsay87 Lindsay87](https://dfc-org-production.my.site.com/img/userprofile/default_profile_45_v2.png)
Lead Conversion Error - Duplicate Records
Hello! New admin here looking for some help.
{!REQUIRESCRIPT("/soap/ajax/20.0/connection.js")}
{!REQUIRESCRIPT("/soap/ajax/20.0/apex.js")}
var x=sforce.apex.execute("SH_Household_Utils","ConvertLead", {leadId:"{!Lead.Id}"});
var y = ""+x;
if ( y.length!= 18 || y.substr(0,3)!="001") {
alert("Error Convert Lead: "+y);
}
else {
var t = confirm("Lead is successfully converted into household and contact. Do you want to create a task for the new household?") ? "/00T/e?what_id="+y+"&retURL=%2F"+y : "/"+y;
top.location.replace(t);
}
When she goes to convert the lead, it still does convert it to a household but the pop up shows on almost every lead she converts. It's just rather inconvenient to have to close the error each time.
What do we need to do in order to prevent this error message from coming up on almost every lead conversion? Especially for ones where there is no duplicate in the system.
We submitted a ticket with Salesforce and they told us to post on here. Any help would be great. Thanks!
One of our users has reported that "For some reason on almost every lead I convert, I get the attached duplicate file window even when there is no duplicate. It is also not giving me a link to the duplicate record it's telling me I am creating. " This error message pops up almost every time she converts a lead, even when there is no duplicate record.
![Error Message](/forums/servlet/rtaImage?eid=9060G000000XgFY&feoid=Body&refid=0EM0G000000c1D7)
We have a 'Convert Lead' button that is used and here is the OnClick JavaScript for that:{!REQUIRESCRIPT("/soap/ajax/20.0/connection.js")}
{!REQUIRESCRIPT("/soap/ajax/20.0/apex.js")}
var x=sforce.apex.execute("SH_Household_Utils","ConvertLead", {leadId:"{!Lead.Id}"});
var y = ""+x;
if ( y.length!= 18 || y.substr(0,3)!="001") {
alert("Error Convert Lead: "+y);
}
else {
var t = confirm("Lead is successfully converted into household and contact. Do you want to create a task for the new household?") ? "/00T/e?what_id="+y+"&retURL=%2F"+y : "/"+y;
top.location.replace(t);
}
When she goes to convert the lead, it still does convert it to a household but the pop up shows on almost every lead she converts. It's just rather inconvenient to have to close the error each time.
What do we need to do in order to prevent this error message from coming up on almost every lead conversion? Especially for ones where there is no duplicate in the system.
We submitted a ticket with Salesforce and they told us to post on here. Any help would be great. Thanks!