Click here to Skip to main content
Licence CPOL
First Posted 18 May 2007
Views 52,075
Downloads 677
Bookmarked 49 times

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

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

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



India India

Member



Sign Up to vote   Poor Excellent
Add a reason or comment to your vote: x
Votes of 3 or less require a comment

Comments and Discussions

 
You must Sign In to use this message board. (secure sign-in)
 
Search this forum  
 FAQ
    Noise  Layout  Per page   
  Refresh
GeneralSharepoint and MS CRM 3.0 not on same machine Pinmemberinge-andre3:26 1 Sep '08  
QuestionHow to open sharepoint site when probablity reaches 65 automatically PinmemberSonia165:32 23 Jun '08  
Questiona question on the code to create sites Pinmemberjolee2316:47 4 Mar '08  
AnswerRe: a question on the code to create sites PinmemberAvinish Awasthi3:25 17 Mar '08  
If you are familiar with CRM customization then you need to add custom feilds in Account.Then publish it.Basically Its a custom DLL.Which needs to be put on in the bin directory of CRM workflow.So After that you need to create the Workflow rules as mentionted in the document. So whenever you put the logurl,account name while creating any account.The CRM workflow service calls this dll and it it takes the values from the created account and creates sites in Sharepoint.
 
Avinish Awasthi

GeneralTrying to get it working PinmemberJabbo4:33 13 Dec '07  
GeneralRe: Trying to get it working PinmemberAvinish Awasthi3:28 17 Mar '08  

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Permalink | Advertise | Privacy | Mobile
Web03 | 2.5.120529.1 | Last Updated 17 Mar 2008
Article Copyright 2007 by Avinish Awasthi
Everything else Copyright © CodeProject, 1999-2012
Terms of Use
Layout: fixed | fluid