+ Start a Discussion
xpresslanejxpresslanej 

web-to-lead not picking up record type even with "keep existing record type" option set

Howdy everyone,

 

Well, I'm a bit stumped. I'm trying to test a web-to-lead form where I preset the record type:

 

 

<input type="hidden" id="recordType" name="recordType" value="012Q00000008ULW">

 

I have the "keep the existing record type" option set under Lead Settings and it is still not working. 

 

Everything else is populating correctly on the lead record in SFDC. 

 

Thoughts?

 

Thanks, 

 

Best Answer chosen by Admin (Salesforce Developers) 
xpresslanejxpresslanej

I figured it out...not intuitive at first, but I can understand the reasoning I suppose based on the order of operations. I checked the profile of the Default Lead Owner and this profile did not have the new lead record type selected under Record Type Settings. Did not think about this at first because a user with this profile should NEVER be assigned this type of lead. However, even though the assignment rules were assigning the leads to the right user (who has a different profile), the record type was not being set. Adding the new record type to the Default Lead Owner's profile fixed this. 

 

Does this mean that, in terms of operations, that the lead owner is first set to the Default Lead Owner and then assignment rules are evaluated & applied? 

 

 

Message Edited by xpresslanej on 05-11-2009 10:21 AM

All Answers

xpresslanejxpresslanej

I figured it out...not intuitive at first, but I can understand the reasoning I suppose based on the order of operations. I checked the profile of the Default Lead Owner and this profile did not have the new lead record type selected under Record Type Settings. Did not think about this at first because a user with this profile should NEVER be assigned this type of lead. However, even though the assignment rules were assigning the leads to the right user (who has a different profile), the record type was not being set. Adding the new record type to the Default Lead Owner's profile fixed this. 

 

Does this mean that, in terms of operations, that the lead owner is first set to the Default Lead Owner and then assignment rules are evaluated & applied? 

 

 

Message Edited by xpresslanej on 05-11-2009 10:21 AM
This was selected as the best answer
TaoDuhTaoDuh

I agree that xpresslanej's reply is accurate.  But there is a little more to the story and that "little more" has me stumped for the moment.  Here's my scenario:

 

Recordtypes of Interest

UKType1

UKType2

USType1

 

Users of Interest

DefaultLeadCreator (Profile = sysadmin, e.g. permissions to all types, default lead RT = USType1)

UKLeadProcessor (Profile includes permissions to all UK types, default lead RT = UKType1)

 

Web-2-Lead entry comes in with recordtype = UKType2.  Below is what I see in History.

 

In sum, before the lead is assigned to UKLeadProcessor, the recordtype is changed to his default RT (not the system default RT).  There are no triggers that make any updates to these UK leads on insert.  I have to think that those two rows should be flipped but even then I can't solve the problem.  I have logged in as UKLeadProcessor and confirmed I can create leads with RT UKType2.  Any other thoughts?

 

4/28/2010 2:48 PMDefaultLeadCreator
Changed Owner (Assignment) from DefaultLeadCreator to UKLeadProcessor.
  Changed Lead Record Type from UKType2 to UKType1.
  

Created.

TaoDuhTaoDuh

My problem is solved.  I hit up support for help on this one and they pointed me to the solution.

 

See Customize/Leads/Settings

 

Look (confusingly) under Lead Conversion Settings.  You'll see:

 

The behavior used when applying assignment rules to manually created records.
Record Type SettingKeep the existing record type

 

The setting above is what you want as opposed to override with user's default record type.

 

brettnnycbrettnnyc

Can you please tell me how to implement your line of code (where in the web-to-lead html)? I cannot get each of my unique web-to-lead sites to have their own record types. The code from your previous post that I'm referring to is:

<input value="012Q00000008ULW">

TaoDuhTaoDuh

Here's the simplist way.

 

Navigate to Customize/Leads/Web-to-Lead

Click Create button

Move Lead Record Type into Selected Fields and click Generate.

 

Part of your results will look like the below.  Use those values as you choose (e.g. pick one and make a hidden field or whatever you want to do)

 

<label for="recordType">Lead Record Type</label>

<select  id="recordType" name="recordType">

<option value="">--None--</option>

<option value="01280000000xxxx">Lead Record Type 1</option>
<option value="01280000000yyyy">Lead Record Type 2</option>
</select>

 

example: could put this in your form

 

<input type="hidden" id="recordType" name="recordType" value="01280000000xxxx" />

 

Chirag MehtaChirag Mehta

That really helped. Thanks!

iluuukiluuuk

Thank you sooooooo much!!!:smileyvery-happy:

AllieP3AllieP3

Thank you So much!!! I have been racking my brain trying to solve this problem!

shirley_lafuente@hotmail.comshirley_lafuente@hotmail.com

Hi,

 

I think this is what I need.  So do I add an input line for each of the record types?  In your example would it be:

 

 

<input type="hidden" id="recordType" name="Lead Record Type 1" value="01280000000xxxx" />

<input type="hidden" id="recordType" name="Lead Record Type 2" value="01280000000yyyy" />

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

</form>

 

Essentially there are 2 sections.  The first label section & then the input?  Thanks for your help.

Mak RathorMak Rathor
Hi,
I'm creating web-to-lead form, leads having record types...I'm setting rt inside hidden field like <input type=hidden name="recordType" id="recordType" value="012110000000xxx"> , but it still not creating record....also there is a dropdown field inside the form, according to its value record type has to be set like If dropdown value is "A" then the record type should be "A". How can I achieve that ?
Mukesh Kumar 107Mukesh Kumar 107
Old post but worth noting.
After configuring everything make sure 

Setup | Customize | Leads | Lead Settings - For leads
"Record Type Setting = Keep the existing record type"

Lead RecordType Assignment

This will make sure whatever RecordType you are sending from the web-form will be assigned to the New Lead RecordType, instead of overwriting it to default which defined in the Default Lead Owner.
Marc Bourlon 21Marc Bourlon 21
Old thread, but my own example is a proof that you can still get bitten by this  stupid issue. If you use the 18 chars ID of your record types, it will fail to assign the expected record type, instead using the default (now, THAT is stupid!): make sure you use the 15 chars only ID!