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 firstname.lastname@example.org)
- 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!
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
And here is my SharePoint
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.
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 http://www.microsoft.com/download/en/details.aspx?id=5283
Step 2 – Extract the files,
Double click the installer
Read and understand and if you accept the terms tick mark and continue
Select the Location for extraction
Once successfully extracted open the location (“c:\CRM List Component\” in my case)
You will see 3 files, just 2 of them are important.
$WebApp = Get-SPWebApplication –identity <url of your webapp>
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 !
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.
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.
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.
Navigate to Site Action> Site Settings > Solutions (Under Galleries)
Upload > and point to crmlistcomponent.wsp
Now click Activate.
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
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 http://app1/
Successful run will show you a similar window
Step 1- Open CRM 2011 Site > Settings (at bottom of the image)
Click on Document management > click Document Management Settings
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.
CRM now will validate if the sandbox solution is present in that site collection and once it detects its presence will it continue further
Now we are given an option to select – On which Entity should CRM create the folder structure? Based on accounts or Contacts ?
Once we click next it will prompt to create the document libraries in SharePoint, say Ok , and it finishes with a charm.
Since we went with default entities, we got 7 libraries created in SharePoint
Open the CRM workspace> Open a Account.
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
We got the library created
Add a document to this
You will see it below like this
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 !
1. Finally All the feature of document management server is provided in the CRM UI itself
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.
Enter the absolute url of the SharePoint library and you will see it in IFRAME
Now click save and see the library in IFRAMEJ.
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.
Notice 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.
The result is – the users get the drop down to select where he wants to upload the document.
4. The Edit Location button will give us option to alter the location of the SharePoint folder.
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
I will be back with other parts soon !
Questions/feedback are welcome.
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.
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.
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?
Good and informative blog, Anand.
Anand has come up with some cool articles on the following topics, which I am sure will be useful to
Very good content, congratulations.
Well done Anand, very informative
Very helpful and nice article .. release more on the basis of Real Scenario.
i had a problem running the command allowhtcextn.ps1 .... but it went right when typing .\allowhtcextn.ps1 http://site collection.
Thanks for you all :)
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?
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 !!
Has anyone ever faced the same problem as mentioned by Bhaskar? I am facing it too and it is driving me nuts!!
You have to enable Sandbox service on SharePoint admin console to enable the Activate button.
good detailed description. really helpful