Partager via


CRM 2011 and SharePoint 2010 / 2013 Integration - Part 1

 

Hi SharePoint Folks,

I am back with yet another post, this time I will focus on an evergreen subject, Integration between SharePoint and CRM 2011 ? This is a huge topic as there are many possibilities. To have a better clarity on each of the Integration point, I’m going to split the post basis on the integration point covered.

Part 1: Introduction and CRM 2011 - Document management Integration with SharePoint 2010 (This post)

Part 2: Reporting CRM data in SharePoint using Excel services

Part 3: Publishing CRM entities in SharePoint.

Part 4: Search CRM entities from SharePoint Enterprise Search.

SharePoint 2013 folks read this – The below procedures work with SharePoint 2013 too. there is absolutely no change in the below process to make SharePoint 2013 work with CRM 2011 ( any rollup) – UPDATED on Wed 04/10/2013

======If you have CRM in IFD, read below=============

UPDATED section - Tue 02/19/2013

So If you have your CRM setup as internet facing Deployment, you can still use this blog with few things in mind such as :-

1. SharePoint site that you intent to use MUST be accessible via Internet – Reason is that your CRM is internet facing, people will work on CRM from internet, when people work on CRM and go to document management  the SharePoint site loads in that frame. That connection is pure the client to server (End user computer to server), not server to server ( CRM server to SharePoint server). So SharePoint MUST MUST MUST be published via internet.

2. SharePoint MUST be SSL so your SharePoint site must be https.

3. You can use the same ADFS infrastructure to setup SharePoint Web application, use Sarath’s blog to setup the SharePoint and ADFS setup, You can have claims like UPN and ROLE if your Active directory ( or Identity provider) does not necessarily have Email attribute filled. ( if this point is confusing email me here anand.nigam@hotmail.com)

- Special Thanks to Tarquin  for excellent suggestion to put this info in this SPECIAL section on this ;) As many of you are searching for this info.

======End of Section===================================

The word you are thinking is “awesome”, well I know J. Ok let’s cut short the talking and make it work, get ready!

CRM 2011 - Document management with SharePoint 2010

So below is what you will need

1. CRM 2011 deployment and some sample data (I populated my CRM with built in sample data).

2. A SharePoint 2010 farm, with a web app created

3. This post

In CRM 2011, document management feature comes OOB. This makes it very easy to setup document management as compared to CRM4. Once we are able to setup this up, a CRM 2011 user can create, upload, download, modify etc. to the documents/content in SharePoint without leaving the CRM UI, AND without using “not so good looking“ IFRAME method. Moreover it’s easy to pull administrative information too, All with minimal efforts J

So here is my CRM

clip_image002

And here is my SharePoint

clip_image004

To actually integrate the two we have to complete 2 tasks

a. Make SharePoint aware that CRM is going to speak to it –

This is done by an add-on, which is essentially a sandbox solution, Please be aware, Sandbox solution has a restriction to work within the site collection, so if your need is to use multiple SharePoint site collection for integrating with CRM, you have to install the sandbox solution on each of the them. Also Note – I am not talking about subsite, I am talking about site collection.

b. Configure CRM to use SharePoint as the backend document server-

This is done simply by configuring the SharePoint site collection URL in the CRM document management’s settings page.

a. On SharePoint – “Make SharePoint aware that CRM is going to speak to it

Step 1 – Log in to any (if you have multiple servers in SharePoint farm, just take any APPLICATION server) SharePoint server with the farm service account –

Download the List component here https://www.microsoft.com/download/en/details.aspx?id=5283

Step 2 – Extract the files,

Double click the installer

clip_image005

Read and understand and if you accept the terms tick mark and continue

clip_image007

Select the Location for extraction

clip_image008

Once successfully extracted open the location (“c:\CRM List Component\” in my case)

You will see 3 files, just 2 of them are important.

1 – AllowHtcExtn.ps1 – this is the PowerShell script, which “Allows” SharePoint to allow users to use .htc files. In simple words, SharePoint does not by default allows all the file types to be Opened from within SharePoint. Consider this - if you an html file with JavaScript, this file is in SharePoint, and you open it, the browser will render the JavaScript in the html file, which means if the JavaScript is a malicious one, there is a possibility of damage. So to protect clients SharePoint does not lets you open, but gives you option to save it on your disk. With this PowerShell script we will add the .htc file to the list of allowed once. To view all the “Allowed” files run the:

$WebApp = Get-SPWebApplication –identity <url of your webapp>

$WebApp.AllowedInlineDownloadedMimeTypes

2 – crmlistcomponent.wsp - this is the solution, that we will upload to the SharePoint site solution gallery that will enable SharePoint to “Speak” with CRM

Easy till here? The next part is easy too !

clip_image010

Now Open SharePoint central administration site. Navigate to System Settings > Manage Services on Server > Look for “Microsoft SharePoint foundation Sandboxed Code Service”, now Click on Start. On a “Not so important” note - it’s always a good idea/best practice to turn on the services on multiple servers.

image

UPDATE- The figure above is updated with correct service highlighted.

Ensure that you have started it , otherwise the sandbox solution WILL not work. Ok once this is done open services.msc and ensure the service “SharePoint 2010 User Code Host” is “started”. Not doing these steps are the most common reasons why many get error when they try to Activate the solution.

clip_image014

Now Open the SharePoint site and navigate to the site collection where you want CRM to push the data. In my case I have a default site collection “/” so I will navigate to it in the browser.

clip_image016

Navigate to Site Action> Site Settings > Solutions (Under Galleries)

clip_image017

clip_image018

Upload > and point to crmlistcomponent.wsp

clip_image019

Now click Activate.

clip_image020

On successful activation click on the solution once and ensure that your window looks similar to the one below. I get Deactivate options confirms the solution is successfully activated J

clip_image021

Now Time to run the script

Fire up the SharePoint management shell > navigate to the AllowHtcExtn.ps1 location and run it in the below way

> AllowHtcExtn.ps1 <site collection url>

Eg > AllowHtcExtn.ps1 https://app1/

Successful run will show you a similar window

clip_image023

b. On CRM Server –“Configure CRM to use SharePoint as the backend document server

Step 1- Open CRM 2011 Site > Settings (at bottom of the image)

clip_image024

Click on Document management > click Document Management Settings

clip_image025

Now in the following window tick mark those entities where you WANT to have Document management Option. Eg :- if you only want “Account” entity to have the option to upload and download document select it, if you want document management on other entities like Order, Price List , Contract etc. just select it. By default Account, Article, Lead, Opportunity, Product, Quote and Sales Literature are already selected.

Next Enter the site collection url in the URL box.

clip_image026

CRM now will validate if the sandbox solution is present in that site collection and once it detects its presence will it continue further

clip_image027

Now we are given an option to select – On which Entity should CRM create the folder structure? Based on accounts or Contacts ?

clip_image028

Once we click next it will prompt to create the document libraries in SharePoint, say Ok , and it finishes with a charm.

clip_image029

Since we went with default entities, we got 7 libraries created in SharePoint

clip_image031

And with that last click we are Done !!! Time for testing.

See it in Action

Open the CRM workspace> Open aAccount.

Click on Documents menu on the left and you will receive a prompt (it says that I’m going to create a folder with the account’s name) say Ok

clip_image033

We got the library created

clip_image035

Add a document to this

clip_image037

You will see it below like this

clip_image039

If I now do the same operation for the entity Opportunity I will see the documents in a folder name Opportunity under the account library.

Thats it, we are done with the Document management integration of CRM 2011 and SharePoint 2010, wasn’t that easy !

Good to know -

1. Finally All the feature of document management server is provided in the CRM UI itself

clip_image041

1 - Navigate up – For navigating up in the SharePoint location

2 - Create folder – create a new folder in SharePoint

3 - New document - Requires Office 07/10 installed on client, for win2008 Desktop experience feature is required

4 – Upload – upload a document

5 - Edit document – Edit in office application, Office client must be installed on the client

6 - Delete document – Deletes from SharePoint

7 - Open the SharePoint site – Opens in another window the SharePoint site

8 - Check Out – Exclusively lock the document for yourself

9 - Check In – After edit is done check in to commit your change or unlock the document

10 - Discard Check out- Discard whatever you did after checkout

11 - Set alert on SharePoint – subscribe to email alerts on events on the document (eg,: document change, deleted )

12 - Download document – download a copy of the document locally

13 - Copy Shortcut – get the document url in clipboard

14 - Send Shortcut – needs outlook installed on client

15 - View Properties – view the metadata (date modified, author, last modified by, last modified date etc)

16 - Edit Properties – edit the metadata

17 - Versions – Shows different versions of document from previous edits

2. If you DO NOT have list component on SharePoint still you can use the SharePoint libraries to store document. When you will use the documents option in the CRM entity it will ask you for a SharePoint library, Which CRM will show you in an IFRAME (like the good old days of CRM 4 with IFRAME of SharePoint library). CRM 2011 does the IFRAME configuration automatically.

clip_image043

Enter the absolute url of the SharePoint library and you will see it in IFRAME

clip_image044

Now click save and see the library in IFRAMEJ.

clip_image046

3. On the entities we can see the option “Add Location”, this way we can have multiple locations added for content storage, it can be another SharePoint site or a different URL.

clip_image048

clip_image049Notice the URL of the SharePoint, it’s a sub site, OR you could use another folder too. My intention is to have a separate folder for contract documents and another folder for other type of documents.

clip_image051

The result is – the users get the drop down to select where he wants to upload the document.

clip_image053

4. The Edit Location button will give us option to alter the location of the SharePoint folder.

clip_image055

5. Something that you must know .The Option to Remove / Delete added location is nowhere here. You must navigate to Document management settings > SharePoint Document Location. Remember this is the only place where you can see all the SharePoint sites currently used by CRM

clip_image057

I will be back with other parts soon !

Questions/feedback are welcome.

Technorati Tags: CRM sharepoint integration,CRM 2011 document management,CRM sharepoint List component

, CRM IFD SharePoint,

Comments

  • Anonymous
    December 20, 2011
    Lets say I have configured 3 document locations called as Deals, Contracts and Pipeline. When the user opens the Account, I would like him to see Pipelines by deafult. Is there anyway I can default that. Right now, if I add something to the Contracts then next time any one opens up the form will show the Contracts.

  • Anonymous
    December 22, 2011
    In what sequence did you add 3 Document locations ? CRM renders the last Added Document location First, so I assume you did not added Pipelines last.

  • Anonymous
    January 31, 2012
    When I point the Document Location to a already created Shared Document site, it looks good until I exit CRM and go back in. At that point when I go to the Documents section, I get an iFrame message saying that it cannot display. Do you know how to fix this? Thanx, Scott

  • Anonymous
    April 07, 2012
    Good and informative blog, Anand. Good work!

  • Anonymous
    April 07, 2012
    Good and informative blog, Anand. Good work!

  • Anonymous
    July 30, 2012
    Anand has come up with some cool articles on the following topics, which I am sure will be useful to

  • Anonymous
    August 11, 2012
    Very good content, congratulations.

  • Anonymous
    September 11, 2012
    Well done Anand, very informative Thanks, Lucas

  • Anonymous
    September 19, 2012
    Very helpful and nice article .. release more on the basis of Real Scenario. Thanking you

  • Anonymous
    January 15, 2013
    i had a problem running the command allowhtcextn.ps1 .... but it went right when typing .allowhtcextn.ps1 http://site collection. Thanks for you all :)

  • Anonymous
    January 21, 2013
    Hi, great doc thanks. I am not too familiar with SharePoint. I am currently running SBS 2011 with SharePoint as standard and CRM 2011 on an 2008 R2 Server. Can you point me in the direction of a document that explains how to create new web app or site as you say for CRM within SharePoint? Kind Regards Craig

  • Anonymous
    January 23, 2013
    Hello, Thank you for this perfect article. You have defined each and every step in a very clear and comprehensive manner. Excellent Job!! However, I am facing a tiny rpoblem while trying to activate the add-on on the Sharepoint site. It doesn't let me activate it and says that "The website declined to show this webpage" Most likely causes: This website requires you to log in. I am not sure what's the possible reason for this. I am really new to Sharepoint and a little lost as to what should be done.Also, I checked and I am one of the administrators on this machine. Please help !!

  • Anonymous
    January 26, 2013
    The comment has been removed

  • Anonymous
    February 26, 2013
    You have to enable Sandbox service on SharePoint admin console to enable the Activate button.

  • Anonymous
    April 05, 2013
    good detailed description. really helpful

  • Anonymous
    April 09, 2013
    Very well defined. Thanks!

  • Anonymous
    April 10, 2013
    Hi Folks, Thanks for letting your thoughts known to me. Just a quick note - With SharePoint 2013 now released, there is absolutely no change in the integration. So everything in the above procedure remains the same. Thanks

  • Anonymous
    April 17, 2013
    it was a great post. Thanks for sharing this

  • Anonymous
    May 06, 2013
    Very helpful and useful - only thing I would add - - you need to make sure the user on CRM has enough rights on the SharePoint site collection utilized.  =]

  • Anonymous
    May 28, 2013
    I would like to thank you for the efforts you have made in writing this article. I mostly agree with you most of the point I have subscribed the feed and looking forward for the followup subscriptions.

  • Anonymous
    June 20, 2013
    How do you filter the documents seen in CRM?  We have some documents by year, and only want to see the current year.  We also set an archive flag on documents that are no longer current but that we must keep for compliance. We only want to see (by default) the non-archived documents. We set the default view in SharePoint to take these into account, but it doesn't seem to affect the list of documents we see in CRM.

  • Anonymous
    July 20, 2013
    our clients are using CRM as a helpdesk system. They want to integrate SP with CRM. SP will have some reports, scorecards etc. If a user feels something is wrong in reports or scorecard item, they want to allow user to start a workflow in their CRM helpdesk. How to do this?

  • Anonymous
    August 01, 2013
    The comment has been removed

  • Anonymous
    September 09, 2013
    Really helpful, thanks

  • Anonymous
    October 29, 2013
    All features are good. But sorting is not working properly. After clicking on sorting, page stops responding. Thanking you.

  • Anonymous
    January 10, 2014
    by doing this if i crate a account in crm will it reflate on the sharepoint list ???

  • Anonymous
    January 10, 2014
    can you Please provide me a link, where if i update or create a record in crm than it reflates int he share point site

  • Anonymous
    March 13, 2014
    CSOM VS SSOM for document library move from one site to another sharepoint site from CRM? what will you recommend? .Currently we are using CSOM .will be helpful if you could give some suggestion?

    Thanks
    Rooba

  • Anonymous
    April 04, 2014
    The comment has been removed

  • Anonymous
    April 17, 2014
    Does the user need separate roles and rights in Sharepoint to Modify / update the document. I mean within the CRM.

  • Anonymous
    May 01, 2014
    Anand,
    The post looks excellent. Does this same sequence/steps work for CRM 2013 with SharePoint 2013??

    Also , if we merge 2 accounts, how does the documents on SharePoint side trated..are they still gonna stay separate or both will be merged or we loose deactivated account docuements??

    Please assist.
    Thanks,
    Nick

  • Anonymous
    June 12, 2014
    Nice article.. I have a question.. How can i hide 'open sharepoint' button from document location.

  • Anonymous
    June 20, 2014
    Thank you for the article. It was really helpful. In my Company we use to do the Integration like this but shortly I found this solution which adds a lot more features to the standard Integration, e.g. finally I got automatically an OneNote Notebook saved in SharePoint for every customer.

    http://www.protechnology.de/de/Consulting/CRMSharePointIntegrator/EN.aspx

  • Anonymous
    June 25, 2014
    The comment has been removed

  • Anonymous
    August 12, 2014
    The comment has been removed

  • Anonymous
    August 14, 2014
    Great article, thanks for sharing.

  • Anonymous
    September 04, 2014
    I want to see specific account ( say Account 1) document when I click that particular account Document link. I don's want to see all the documents stored for all accounts. I am new to this. Is this by default feature or is it feasible?

  • Anonymous
    September 16, 2014
    The comment has been removed

  • Anonymous
    September 16, 2014
    thanks

  • Anonymous
    September 30, 2014
    Introduction
    In October 2014 I will be giving a talk to the Geneva SharePoint User Group about the integration options between Dynamics CRM and everyone’s favourite document management repository...

  • Anonymous
    September 30, 2014
    Introduction
    In October 2014 I will be giving a talk to the Geneva SharePoint User Group about the

  • Anonymous
    October 09, 2014
    I am also facing the same problem as > Bhaskar said... even though I am the SC Admin.

    My site is public facing site, does this solution work for Internet facing site?

  • Anonymous
    October 28, 2014
    Hi,

    Once a user created a folder for a specific account, can that folder in the document library be viewable from other CRM users? We created a folder for one account and we can see the same in sharepoint but we would like to see the same folder from another CRM user from the CRM interface itself. We tried opening the folder using CRM Admin account but we got an error below:

    -----------

    This content cannot be displayed in a frame




    To help protect the security of information you enter into this website, the publisher of this content does not allow it to be displayed in a frame.


    What you can try:



    Open this content in a new window


    -----------

    Thanks!

  • Anonymous
    December 22, 2014
    Thank you. It really works for me

  • Anonymous
    February 02, 2015
    Hi Anand

    Great article. Thanks for sharing it with so much delail description to follow. I am going to follow and set this up on our farm. One thing i like to ask is eventhough i didn't see you mentioned but do these approachs require any change like adding a control on SharePoint master page for Iframe to work in CRM.

    Hope to hear back from you soon.

    Swanl

  • Anonymous
    February 03, 2015
    This is a great article and everything works as illustrated when using Internet Explorer, CRM 2011 and SharePoint 2013.

    One question: Has anyone else noticed browser limitations when using Firefox? Firefox displays a blank iFrame instead of the SharePoint folders.

    Thanks again!

  • Anonymous
    April 21, 2015
    Hi
    I just want to know that is this possible using powershell?

  • Anonymous
    June 04, 2015
    I want to fetch some record from CRM and Show in Sharepoint List .