function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion

Unable to capture the First Name from Web To LEAD in a .Net code.

Hi there,


Using a standard Web to Lead form, we are unable to capture the First Name into the SFDC. When the user enters the Name, he first enter First Name and then Last Name. The Last Name comes into the SFDC but the First Name does not come.


Not sure, why is this happening and what we need to change in the code below to get the First Name. This has never happened before. Please help.:-




                post.Url = "";


                 post.PostItems.Add("first_name", query.ElementAt(i).FirstName);


                 post.PostItems.Add("phone", query.ElementAt(i).Phone);

                 post.PostItems.Add("email", query.ElementAt(i).EmailID);

                 post.PostItems.Add("Lead_Type__c", usertype);

                 post.PostItems.Add("company",  query.ElementAt(i).Company);

                 post.PostItems.Add("title", query.ElementAt(i).JobTitle); // Added

                 post.PostItems.Add("Address", query.ElementAt(i).Address); // Added



                 post.PostItems.Add("oid", "00D00000000hbaA");



                //Lead source

                 post.PostItems.Add("lead_source", "Sunshine Web Site");



                // Lead Recoard Type

                // "012000000008Qyk"= New Sales Lead Record Type

                 post.PostItems.Add("recordType", "012000000008Qyk");


                // Web to Lead Form

                 post.PostItems.Add("00N00000008aJxp", "Mt. Sunshine Interest Form");

                 string result = post.Post();





Thanks for you help.