0

I am debugging issues with web-to-lead in our org. Here are the steps I have taken so far:

  • Add debug email to the form
  • I am the default lead creator
  • I have setup debug logs for my user.

However, I am not getting the debug emails. I have tried to search the web for a possible reason, but have not found anything that would solve this issue.

Here is the web-to-lead form:

<!--  ----------------------------------------------------------------------  -->
<!--  NOTE: Please add the following <META> element to your page <HEAD>.      -->
<!--  If necessary, please modify the charset parameter to specify the        -->
<!--  character set of your HTML page.                                        -->
<!--  ----------------------------------------------------------------------  -->

<META HTTP-EQUIV="Content-type" CONTENT="text/html; charset=UTF-8">

<!--  ----------------------------------------------------------------------  -->
<!--  NOTE: Please add the following <FORM> element to your page.             -->
<!--  ----------------------------------------------------------------------  -->

<form action="https://test.salesforce.com/servlet/servlet.WebToLead?encoding=UTF-8" method="POST">

<input type=hidden name="oid" value="ourOrdId">
<input type=hidden name="retURL" value="company usl">

<!--  ----------------------------------------------------------------------  -->
<!--  NOTE: These fields are optional debugging elements. Please uncomment    -->
<!--  these lines if you wish to test in debug mode.                          -->
<input type="hidden" name="debug" value=1>                              
<input type="hidden" name="debugEmail"  value="myEmailAddress">                                       
<!--  ----------------------------------------------------------------------  -->

<label for="first_name">First Name</label><input  id="first_name" maxlength="40" name="first_name" size="20" type="text" /><br>

<label for="last_name">Last Name</label><input  id="last_name" maxlength="80" name="last_name" size="20" type="text" /><br>

<label for="email">Email</label><input  id="email" maxlength="80" name="email" size="20" type="text" /><br>

<label for="company">Company</label><input  id="company" maxlength="40" name="company" size="20" type="text" /><br>

</select><br>

<input type="submit" name="submit">

</form>
3
  • So, are the test leads you're creating via the form actually getting created, at least? Commented Apr 5, 2023 at 20:15
  • @StephenVoris Some of the leads are getting created - while others are not. I am trying to figure out why some of them are not getting created.
    – Kalpesh
    Commented Apr 5, 2023 at 20:21
  • are you included in the Apex Exception emails ? Do you have duplicate rules set up for Lead?
    – cropredy
    Commented Apr 6, 2023 at 0:42

1 Answer 1

0

Okay, so, first - it's not enough to uncomment the line, you also need to replace "myEmailAddress" with an actual [email protected] email address that you've got access to. If you've done that but haven't reflected that in your code here for privacy reasons that's fine, but I'm not sure what else it would be.

Second, though, check for required fields and validation rules; you can mitigate those to a degree by filling in those values on the form with <input type = "hidden" name = "requiredField" value = "whateverLeadsFromHereGet">, but generally you shouldn't have very many required fields in the first place on leads, especially not at creation.

1
  • I have removed my actual email address for privacy reasons. All the required fields are on the form.
    – Kalpesh
    Commented Apr 5, 2023 at 21:57

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .