1. Custom CRM / SharePoint
integration
From zero to hero in 60 minutes
2. About me
Martijn Eikelenboom
Office 365 / Dynamics 365 (CRM) consultant
Delta-N
www.oak3.org
@meikelenboom
Dutch Dynamics 365 / CRM Meetup http://bit.ly/dutch365meetup (next in
September)
3. Why this session
Custom SharePoint (online) integration with Dynamics 365 / CRM
Out of the box (where possible)
SharePoint better practices
‘Easy’ to build
Low cost
4. Default CRM integration
SharePoint
One Library for all accounts
Folder based
Folder names contain ‘Guids’
Sample:
/sites/d365/account/Contoso_475B158C541CE51180D33863BB347BA8
10. SPMeta2
Code based SharePoint artefact provisioning
Uses C# POCO objects to define artefacts
public static ListDefinition GeneralDocuments = new ListDefinition
{
Title = "General",
Description = "Library to store general documents",
TemplateType = BuiltInListTemplateTypeId.DocumentLibrary,
CustomUrl = "General"
};
17. Azure Function deployment
Manually (Azure Portal Editor)
Azure Function Tools for VS2017 (preview V15.3) http://bit.ly/azurefunctiontools
Web project with custom start action (VS2015 & 2017)
http://bit.ly/azurefunctioncustom
Continous deployment from source control
http://bit.ly/azurefunctioncd
24. Takeaways
Unable to programmatically create site collection in CRM
Subsites vs Site Collections
Autonumber for entities
Throttling
Bulk import / migration
Workflow / plugin manual retry option
25. Where to go from here
Use this concept as a starting point
Authentication
Queues
Resilience
Content types
Document sets
Permissions
SharePoint updates
Use this concept as a starting point
This concept is a good starting point, but there are a few things to consider before going into production
Authentication
Considered it a bit too much to include modern type authentication scenario’s
Complex
Focusing on citizen developer
Queues
Queues might be a good option to prevent throttling limitations or timeout issues. The drawback is that your workflow status will almost always be succeeded, even if the deployment of the model fails.
Resilience
SPMeta2 supports updates to the model without affecting the content. Add a check if the web exists on SPO and if the libraries exist in CRM and you can redeploy to model without any issues. E.g. when it fails, or when you want to update the model (Adding a new library)
Check if CRM site & document location exists, if so skip the creation of it
Content types
Consider deploying content types to your site collection, and have a default custom content type per Library. This enables you to customize SharePoint search where:
You can filter based on the Web title
Filter based on the content type, which is similar to the Library
Users don’t have to do anything extra when uploading files
You can also consider adding metadata fields to your model and content type.
Document sets
Gives you an option to help structure. Document Sets are folders with the added option to add metadata to the document set that will be inherited by al the files in the document set
Document set can be deployed form CRM and metadata can be set as well.
E.g. a customer site, with a project library and a document set per project. You can set metadata on the document set from CRM and make sure every document inherits from this document set metadata.
SharePoint updates
SharePoint is receiving a lot of updates at the moment. Although remote provisioning is the recommended approach, I’ve have run into issues where Microsoft breaks the deployment. So be aware to this changing platform and keep up to date with changes.
Permissions
Remote setting and updating permissions in SharePoint is fully supported. On site, web, library, folder and item level. You can use this model to set permissions as well, however it will increase the complexity greatly