I received an e-mail last week with a link to a product that will take an e-mail and generate a lead in Microsoft Dynamics CRM. One of the people in the office said that would be really cool. We have some forms on our web site that get e-mailed to us. We could simply select the e-mail and say “create a lead”. It sounded like a reasonable business request. But then I asked, why is the web site e-mailing you the form data? Why not simply write the form straight to Microsoft Dynamics CRM? Then we can process the new Lead using our workflow process.
This is a very simple process to connect to Microsoft Dynamics CRM from a ASPX web page and generate a new lead.
The process to do this is very straight forward. I created a class called leadwrite. I have a main method called write(). It has many arguments for each attribute we capture on the form. The method simply validates the arguments. If everything is valid it connects to our CRM and creates a CRMService object. Using this object we can create a new lead.
There is no reason to post all the code in a blog. If you’re interested in the code, test out one of our Forms and we will send it to you. Submit a form on our web site and request the code from this blog.
You can test on your own project. Set the web config properties and create a web form. Add the attributes we collect to your form (or modify the code to collect any attributes you require). Collect the arguments form the screen and call the leadwrite class. That’s it. Done.


I am interested. Please send me one.
Thanks for requesting the code. You need to go into PowerObjects web site and fill out the contact us form. This will write a lead to our CRM. Request the code and we will send you sample code. We have had many people request it. Thanks!
please can i ask for the code of website to crm generaate lead — thanks-
I need a little help. I need to include by default in the project the owner and the campaign. Can you show me how to point to a lookup field.
Thanks for your cooperation
Regards
This is sample code, but the easist way to handle it is to pass a value in that tells you where it came from. Example uses the page. Name. Then have a workflow that sets the values you want defulats set. Hope-that-Helps.
Dean
I am interested in seeing the CRM lead generation code. I am also generating the leads in CRM using the emails sent by me. This part is working well.
Now I have custom attributes which I have added, how do I access them while creating a lead. Any help would be appreciated.
I also am interested in seeing the CRM lead generation code. Thanks so much.
Thanks for your interest. To get the free code sample you need to jump out to our site and fill out a contact us form.
The lead is written to our CRM and one of my staff will send you the code… And call you to see if there is anything we can do to help.
Dean
I also am interested in seeing the CRM lead generation code. Cheers
Hi Andew, thanks for the message.
To get the code sample you need to jump out to our site and fill out a contact us form. http://powerobjects.com/contact.aspx
The lead is written to our CRM and one of our staff will send you the code… And call you to see if there is anything we can do to help.
I need this code please
To receive the code you must fill out a contact form on our web site.
http://www.powerobjects.com/contact.aspx
Dean