Saturday, May 6, 2017

Integrating Dynamics CRM with SharePoint

[Update - This post was selected as one of the top 5 AIIM community blog posts in 2015 -].

By integrating SharePoint with Dynamics CRM, you can leverage the document management capabilities of SharePoint from within Dynamics CRM. This allows you to store and manage documents in the context of a Dynamics CRM record on a SharePoint Server, and leverage the SharePoint infrastructure to share, manage, and collaborate efficiently. 
Integrating CRM and SharePoint
There are 2 ways of integrating SharePoint with Dynamics CRM; using List component and server-based integration
SharePoint version
List component support
Server-based SharePoint integration support
SharePoint 2013 or SharePoint 2013 SP1
SharePoint 2010 SP1 or SP2
SharePoint Online
1. Using CRM List Component (Client based integration)
As shown in the above table this is the only integration method available for on-premise SharePoint environments as they do not support server based integration. However it is possible to use this option with both CRM on-premise and CRM online. This is offered as a SharePoint solution which you need install in a SharePoint site collection,

You can download the Dynamics CRM 2013 List Component for SharePoint 2010 and SharePoint 2013 from here. 
Here is an installation guide - Install the Microsoft Dynamics CRM List Component

2. Using Server – based integration
Server based integration can only be used with SharePoint online. It can be used to connect to either on-premise on online CRM. This method uses Dynamics CRM Server to SharePoint Server (server-to-server) authentication so there is no need to install any additional components.
Before you move to server-based SharePoint integration, review this article - Important considerations for server-based SharePoint integration  to see some of the differences you’ll experience between client-based versus server-based SharePoint integration.
Here is a detailed configuration guide - Integration Guide: Microsoft Dynamics CRM Online and Office 365
Creation of Libraries and Folders
There are 2 options to create document libraries and folders. Automatic folder creation and manual folder creation. The above guide explains the steps of automatic folder creation. It makes it very easy for the users to manage documents in the automatic folder creation option. However there is a limitation of that option since it creates all the folders within the same document library. So this option may not be practical if there are lot of documents to be uploaded which requires a distributed folder hierarchy with multiple libraries. Most importantly it would be better to go for multiple document libraries in order to enforce better security. As an example here is my preferred hierarchy for a typical sales management scenario.
  • Level 1 – Document libraries based on Accounts.
  • Level 2 – Under each document library multiple folders based on opportunities.
  • Level 3 (optional) – Under each opportunity folder, multiple sub folders based on functions such as sales, legal, technical etc…
Now lets look at how to configure manual folder creation according to the above example.
Step 1 : Configure SharePoint Site
1. Create a new site in SharePoint. I prefer to use a dedicated site collection.
2. In CRM go to Settings –> Document Management –> Document management settings. Select the entities to which you need to enable document management. Leave the auto folder creation URL blank. Click Next and then Finish,
3. In CRM go to Settings –> Document Management –> SharePoint Sites. This is where we need to specify what the SharePoint site is. Click “New” which will open “New SharePoint site” dialog. Give a name to the site (Ideally the same SharePoint site name) and the URL of your SharePoint site. Click Save and close. Under “My active SharePoint sites” now select your site and click Activate.
Once activated click the Validate button so CRM can validate the URL of the selected site.
Step 2 : Connect Document Libraries with CRM Accounts
1. Now we have to specify the document libraries based on the required hierarchy. (According to the above example we need to create a document library for each account.). Create a document library in SharePoint for the selected Account and copy the URL. In CRM now go to Settings –> Document Management –> SharePoint Document Locations. Click New, which will open the “New Document Location” dialog. Give a name for the location (ideally the same document library name). Under “Parent Site or location” select your SharePoint site. (This should be automatically displayed as a result of previous step)
Now in the relative URL paste the document library URL and edit it so that it will be relative to the selected SharePoint site.
Now go to the “Regarding” text box. click the search button. This will show you the CRM accounts from which you can select the relevant account. If it is not showing the relevant account or if it is showing some other entities such as opportunities then click “Look up more records”. This will show you a search dialog from which you can select the relevant record. Once selected click save.
Now the linked document library will be displayed under “My active document locations”
2. Now go to the relevant Account in CRM. When you click “Documents” it will show the mapped SharePoint document location,
From here you can now directly upload documents which will be then saved in to the SharePoint document library. Also by clicking “Open SharePoint” you can open the document library in SharePoint.
Step 3 : Connect Folders with Opportunities
1. Now that we have a document library mapped to the CRM Account lets see how we can allocate sub folders for Opportunities under that Account. First create an opportunity in CRM for the selected Account.
2. Then go to Settings – > Document Management – > SharePoint document locations, Click New. Give a name to the document location
3. Click the search button under the “Parent Site or location”. Now this should display 2 options, the main SharePoint site and the document library which we earlier linked to the Account. Select the document library.
4. Under Relative URL, specify the folder name which you need to create in the document library,
5. Under “regarding” select “look up more records” Then “Look for” opportunity. Select the relevant opportunity and click Add. Click Save & Close.
100 laptops
Now you should see 2 records under my Active Document Locations.
6. Now open the relevant opportunity. Click Documents. Now under “SharePoint Document Associated View” it will say the folder cannot be found. It seems this is a bug and we need to save it again.
7. Click Edit location. Now as you can see all the settings are correct. But the Save button is disabled. Until we do some change this will be disabled. So just click on the display name and then space bar. This will enable the save button. Click Save and confirm.
Edit Location
This will create the relevant folder in the document library. Now if you click Documents option in the relevant opportunity you can see that the folder is now attached to the opportunity properly.
As you can see it is not very user friendly to manually link libraries and folders to Accounts and Opportunities. However if you want a proper hierarchy with multiple libraries this is the option available unless you go for a 3rd party or a custom solution
Irrespective of the method you use, there is a major problem in integrating Dynamics CRM with SharePoint. The two applications maintain their own authorization systems so we need to manage user permissions separately. That is we need to manually configure user permissions required for SharePoint document libraries and CRM records separately. This also need to be handled by a custom or 3rd party solution.

Saturday, April 4, 2015

Create Online Surveys in OneDrive using Excel

This is a very interesting feature I discovered recently. Microsoft allows you to create online surveys easily using OneDrive and Excel Online. The best part is that the participants are not required to sign in to OneDrive. You can just generate a unique URL for the survey and distribute. 


 Here is an article with step by step guidelines.

Monday, March 30, 2015

Contributors can edit pages in SharePoint 2013

I think the most widely used permission level in SharePoint is the “Contribute” level which allows a user to view, add, update, and delete list items and documents. So this permission level is the ideal for normal users who will be adding and editing documents in SharePoint libraries.

However a user with contribute permissions will also get a totally unexpected privilege, which is the ability to edit pages in SharePoint. This is because the pages are stored in site pages library. In order to stop this, all you need to do is to remove the contribute permissions of the users in the site pages library.

In the site pages library;

  1. stop permission inheritance
  2. change the permission level of the relevant users in to “Read” instead of “Contribute.”

Sunday, March 29, 2015

OneDrive Sync Issue – An Office File Needs your attention

I am a big fan of OneDrive desktop client. But I have experienced many times that it keeps on failing to sync Office documents with OneDrive. Recently I uploaded a set of files and the sync failed with the message “An office file needs your attention”. When I opened the Office upload center it simply says “open the file in office”. When I opened the file in the relevant office application and save it from there it uploads without any issue.

Luckily I found this article which solved the problem. Now the files get uploaded without any issue.

Saturday, March 21, 2015

At last - Workload-specific admin roles are here in Office365

In Office365 there are several admin roles. This article gives an overview and a comparison among different roles. However up to now one major problem we had was that there was no application / workload specific admin role. So it was not possible to assign an Exchange Admin or a SharePoint Admin.

Finally Microsoft is releasing this much awaited Workload –specific admin roles in to Office365.  Here is the introduction from MS;

“Workload-specific admin roles will provide more flexibility to organizations that want to structure admin access to Exchange Admin Center, SharePoint Admin Center, and Lync Admin Center. For example, an Exchange admin will no longer require Office 365 global admin rights to manage Exchange Online.”

This is still rolling out so may take sometime to appear in your tenant.

Source :

Thursday, March 5, 2015

One of the most useful features in SharePoint online is the ability to maintain an offline copy of your files stored in your OneDrive or document libraries. This is done by using OneDrive for business desktop client. One of the first questions that arise when trying to deploy this feature is how to calculate the bandwidth required. Now there is a calculator released by Microsoft to estimate the bandwidth that an OneDrive for Business client deployment will require.

According to Microsoft;
"this calculator can be used to provide a loose estimate. Once you download the calculator, you will see that there is an opportunity to adjust some of the settings on the Input tab such as the user profiles, working hours, and time zones for your organization. The numbers included are what Microsoft has observed in the field. You can also adjust the number of clients per site and what profile each of those users have on the Client Mix tab." 
If you want to get more understanding of how the calculations are made, there are 3 hidden sheets you need to refer to. 

Tuesday, January 20, 2015

Hide and Unhide a library using SharePoint Designer

As we know we can allow or restrict a user to access a library by configuring permissions appropriately. Sometimes you may need to just hide a library or a list from users without removing permissions. For an example you may have a reference list which need not be directly accessed by users. For such requirements we can hide a library using SharePoint Designer as follows.

  1. Open the site in SharePoint Designer
  2. Open the relevant library
  3. Under settings - > General Settings;
    • uncheck "Display this list on the quick launch"
    • check "hide from browser"
  4. Save

general settings


This will hide the library in the browser. (However user still has permission so he can access with the correct URL.)

To unhide;

  1. Open the site in SPD
  2. Click “All Files” . This will show hidden libraries as well. (If it is a list go to “Lists” folder under All Files.)
  3. Right click the relevant library and click “properties".
  4. Now change the required settings and Save.