Geeks With Blogs

Lance's TextBox

CRMAppointments This post is the ninth in a series of postings, containing examples of SharePoint WebParts that anybody can build all by themselves.  To read all posts in this series, or to get started with the RSSBus WebPart, go here.

#9 – Microsoft Dynamics CRM

CRMContacts The credit for this particular web part template goes to one of my co-workers Shannon Prue.  I asked him if he could put together a MS CRM template example for me, and a few minutes later I had in my inbox a 10 line example template!  In the past, integrating MS CRM with SharePoint meant investing a lot of time, dollars, and ending up with a bunch of rigid complexity.  Not now.  :)  This particular example uses Microsoft CRM Services, but that is not a requirement.

Step one is to make sure you have the RSSBus Web Part installed.  See here for instructions.

Step two, make sure that you have the MscrmOps Connector installed.  Get the service URL for your installation of Microsoft Dynamics CRM (e.g, https://crmserver:5555/mscrmservices/2006/crmservice.asmx) as well as a username and password needed for accessing the service (CRM uses integrated authentication by default, so this will normally be your domain account and password).

Step three, add the RSSBus WebPart to your page, paste the following template into its source editor, edit the serviceurl, username, and password settings to correspond to your own MS CRM instance, and click “Apply”.  You’ll see the web part rendered with a list of contacts from MS CRM.

<rsb:import lib="RSSBus.MscrmOps"/>
<rsb:set attr="serviceurl" value=""/>  
<rsb:set attr="username" value="YOURUSERNAME"/>  
<rsb:set attr="password" value="YOURPASSWORD"/>  
<rsb:set attr="maxresults" value="300" />
<rsb:set attr="_meta.YUITableAttrs" value="mscrm:fullname, mscrm:telephone1, mscrm:address1_city"/>
<rsb:set attr="_meta.YUITableLabels" value="Full Name, Phone #, Country"/>  
<rsb:call op="mscrmContact" format="YuiTable" />

That’s it.  If you’ve read the previous 8 DIY articles in this series, you know what' is coming next:  Of course, you can customize this template for your own needs.  This particular template just renders a grid using the YUI (Yahoo UI) Table.  You can do your own html rendering by inserting your own html inside the scope of the <rsb:call>.  You can list other CRM entities, like appointments, leads, contracts, etc.  In fact, I can change the previous example to list CRM appointments by only changing one line of code.  Just replace op=”mscrmContact” with op=”mscrmAppointment”!  You can create pie charts of CRM invoices, bar charts of orders, etc, just by changing the operation call (the op= part) and the html formatting of the data that comes back!


See all posts in this series:  10 DIY SharePoint Web Parts.
Browse RSSBus Connectors.
Basic RSSBus Scripting Cheat Sheet.

Technorati Tags: SharePoint, RSSBus, WebPart, Microsoft Dynamics CRM, CRM.

Posted on Monday, November 9, 2009 10:13 AM | Back to top

Comments on this post: 10 DIY SharePoint Web Parts #9

No comments posted yet.
Your comment:
 (will show your gravatar)

Copyright © Lance Robinson | Powered by: