• Resolved naomi

    (@myparnasa)


    Hi there,
    We have different “record types” in salesforce, which are divided by different department in the company.
    When setting up a “WordPress to Lead” form, we want to be able to specify the record type for each form, so that it will be listed as the correct record type in Salesforce.
    How can we do this?
    Here’s what I tried:

    • i created a new field and made it hidden and required
    • i gave it the label: recordType
    • i set the value as the name of the record type in Salesforce
    • However, this did not work. The recordType was not registered.
      Any suggestions about how I can make this work?
      Naomi

    http://wordpress.org/plugins/salesforce-wordpress-to-lead/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Nick Ciske

    (@nickciske)

    You set the label as recordType? You mean you set the field name to “recordType”? Hidden fields don’t use the label box.

    Here’s the deal, Salesforce uses its internal ID there… so you can’t enter “MyLeadRecordTypeName”… it’s more like “012d0000000lD0U” — note that is just what my install used you’ll need to find the identifier your system uses for each record type and use that as the value.

    To do that, you can use Salesforce’s web to lead form generation tool, then grab the ids from the code (clunky, but the only way I know of to get at these).

    https://help.salesforce.com/apex/HTViewHelpDoc?id=setting_up_web-to-lead.htm&language=en

    Step 1 tells you where to go. Skip steps 2 &3 and go to 4.

    Make sure you add LeadRecordType to the Selected Fields (you can remove the other fields), then click generate.

    You’ll get a bunch of HTML on the next screen — you’re looking for this bit:

    <label for="recordType">Lead Record Type</label>
    <select  id="recordType" name="recordType">
    <option value="">--None--</option>
    <option value="012d0000000lD0U">TestLeadRT</option>
    <option value="012d0000000lD0Z">TestLeadRT2</option>
    </select>

    In this case:

    012d0000000lD0U = TestLeadRT
    012d0000000lD0Z = TestLeadRT2

    Thread Starter naomi

    (@myparnasa)

    that worked.
    thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How to create field for "RecordType"?’ is closed to new replies.