POWEROBJECTS

718 Washington Ave. N. Suite #101
Minneapolis, MN 55401
View map and all Locations

Send us a message

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.

crm2011

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.

We add web references to CRM SDK Discovery and CRM Service. We also add a few SDK assemblies. This makes it very easy to read the connection arguments from the web config and use the discovery to create a new lead.

 

LeadWrite

 

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.

Avatar for JoeCRM

JoeCRM

Joe CRM is a CRM superhero who runs on pure Microsoft Dynamics CRM adrenaline. As the face of PowerObjects, Joe CRM’s mission is to reveal innovative ways to use Dynamics CRM and bring the application to more businesses and organizations around the world.