5,702,067 members and growing! (14,236 online)
Email Password   helpLost your password?
Enterprise Systems » SharePoint Server » General     Intermediate License: The Code Project Open License (CPOL)

Microsoft Office Sharepoint Server 2007(MOSS 2007) And Microsoft CRM Integration

By Avinish Awasthi

The purpose of the integration is to create collaboration sites on SharePoint 2007 as new accounts or opportunities are created in Microsoft CRM.
XML, C#, C# 2.0, Windows, .NET, .NET 2.0, ASP.NET, SQL 2005, IIS 6, VS2005, SQL Server, IIS, Visual Studio, CEO, Architect, DBA, Dev, QA, Design

Posted: 19 May 2007
Updated: 17 Mar 2008
Views: 30,164
Bookmarked: 30 times
Announcements
Loading...



Search    
Advanced Search
Sitemap
34 votes for this Article.
Popularity: 5.23 Rating: 3.42 out of 5
5 votes, 14.7%
1
2 votes, 5.9%
2
3 votes, 8.8%
3
4 votes, 11.8%
4
20 votes, 58.8%
5
Note: This is an unedited contribution. If this article is inappropriate, needs attention or copies someone else's work without reference then please Report This Article

Introduction

The purpose of the integration is to create collaboration sites on SharePoint 2007 as new accounts or opportunities are created in Microsoft CRM.

Whenever a new account or opportunity in Microsoft CRM is created, a workflow will be triggered. The workflow will execute a .NET assembly called "{SomeName}.dll". This assembly is responsible to create the corresponding collaboration site on SharePoint server.

Using the code

Workflow Architecture  See figure Workflow rule.jpg



Code to Apply Logo to Sharepoint Site

private static void ApplyLogoToSharepointSite( string siteName , string entityName)
 { 
 SPGlobalAdmin globalAdmin = new SPGlobalAdmin();
  string siteURL = ConfigurationReader.GetSharepointSiteUrl(); 
 SPVirtualServer dashboaordServer =       globalAdmin.OpenVirtualServer(new Uri(siteURL));
Microsoft.SharePoint.SPWeb _web =   dashboaordServer.Sites["sites/"+siteName].RootWeb;
  Logger.Instance.LogComment( _web.Url );
if (_web != null)
 {
_web.AllowUnsafeUpdates = true;
_web.SiteLogoUrl =  ConfigurationReader.GetSharepointSiteLogoUrl(entityName);
 _web.Update();

 }

 




 







Points of Interest

Creating Workflow rule in CRM

1.Open Work flow manager.

WorkFlowRule1.jpg(see in document)

<formulas /></formulas />

WorkFlowRule2.jpg(see in document)

WorkFlowRule3.jpg(see in document)

Here we specify the parameter value which will be passed from workflow rule to .net assembly code. We need to pass the accountid and opportunityid respectively for Accounts and Opportunities.

WorkFlowRule4.jpgDownload Proteans.zip - 2,475.7 KB

Then after successfully creation of workflow rule, we need to activate the workflow rule.

History

Update will be coming very soon.............

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

About the Author

Avinish Awasthi



Location: India India

Other popular SharePoint Server articles:

Article Top
Sign Up to vote for this article
You must Sign In to use this message board.
FAQ FAQ Noise ToleranceSearch Search Messages 
 Layout  Per page   
 Msgs 1 to 6 of 6 (Total in Forum: 6) (Refresh)FirstPrevNext
GeneralSharepoint and MS CRM 3.0 not on same machinememberinge-andre4:26 1 Sep '08  
GeneralHow to open sharepoint site when probablity reaches 65 automaticallymemberSonia166:32 23 Jun '08  
Questiona question on the code to create sitesmemberjolee2317:47 4 Mar '08  
AnswerRe: a question on the code to create sitesmemberAvinish Awasthi4:25 17 Mar '08  
GeneralTrying to get it workingmemberJabbo5:33 13 Dec '07  
GeneralRe: Trying to get it workingmemberAvinish Awasthi4:28 17 Mar '08  

General General    News News    Question Question    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

PermaLink | Privacy | Terms of Use
Last Updated: 17 Mar 2008
Editor:
Copyright 2007 by Avinish Awasthi
Everything else Copyright © CodeProject, 1999-2008
Web16 | Advertise on the Code Project