Support Portal ContactGet in touch

Publishing Content Types from Dynamics to SharePoint

   Words by CRM Consultancy

   on 07/10/2018 08:00:00

Content Types are a brilliant feature in SharePoint, allowing each Document to be uploaded with a discernible type and set of attributes - his helps us in adding meaning to each document we store and improving how we search and find information in SharePoint.

The challenge has been that customising SharePoint to define our list of Content Types and then the Attributes for each Content Type can be quite fiddly, particularly if managing a common set of Content Types across multiple Sites or Site Collections in a well-managed way.

DocMan for Dynamics helps here by allowing us to define our list of Content Types and Attributes in Dynamics CRM and publish to SharePoint to keep both systems in Sync, and crucially allow us to see these Content Types when viewing Documents in CRM.

The following guide aims to show how to configure this approach in Dynamics using DocMan:

Step 1 – Define our New Content Type

To implement this, we start in the DocMan Configuration Area in Dynamics:

image

The DocMan Configuration of Dynamics - showing the Subgrid of the Content Types between Dynamics and SharePoint

Here we have our list of defined Content Types in the bottom right.

We can use this grid to click the + icon to define an entirely new Content Type – say for ‘Legal Document’.

image

Creating a New Content Type in Dynamics to publish into SharePoint

We can then click SAVE to define our new Content Type.

We can then add Columns to the Content Type to define Attributes we may want to flag or store with each Document we upload under that Content Type:

image

Defining a New Attribute for our Content Type – in this case using a set of options from an Option Set Field in CRM

We can add various types of attributes to define how this appear to the User in Dynamics:

  • String, a basic text field where we can free-type any content.
  • Option Set, integrates with Dynamics to present a fixed set of drop-down options from a Field or Global Option Set in CRM
  • Lookup, allows us to select an option based on Records in Dynamics, and so potentially pick a Record from a particular Entity.
  • Applicable to All Content Types, this flag allows us to automatically apply the Attribute to all of our Content Types – this can be useful if we have an attribute that we need visible across all the types of document we work with. (such as GDPR Classification on whether a Document is classified as Non-Personal, Personal or Sensitive)

This helps us build both the attributes for storing Documents of this Content Type, and the User Interface for how Users will work with these Documents in Dynamics CRM.

We will then have our Content Type ready:

image

You will notice in the screen above that we also attach the Entities to our Content Type as way of controlling which Entities in CRM will use this Content Type when uploading or editing Documents – this allows us to specify which Entities in CRM will use which Content Types.

Step 2 – Publish to SharePoint

We can now publish our Content Type into SharePoint from the main DocMan Configuration Area:

image

Checking this ‘Publish Content Types’ tickbox and clicking SAVE will then publish all the Content Types and Attributes into SharePoint, using the Definition of the Entities in DocMan to know which Sites and Libraries to publish the Content Types into.

Step 3 – See it in action..

Now our new Content Type has been published, we can browse to any one of the entities in CRM we included in the Content Type and see this in action.

image

The Documents Panel with the new Content Type in place for the intended Entity in Dynamics

When viewing the Metadata in Dynamics, we can either change values using the in-line grid or click the EDIT button to open in a Full-screen view:

image

Editing the set of Metadata for a Document using the DocMan Full-screen view

Likewise we can open SharePoint from Dynamics by clicking the LOCATION button and see the new Attributes directly within SharePoint:

image

Viewing the Document in SharePoint and viewing the Details to see the Metadata Attributes

This gives us our Content Type between Dynamics and SharePoint all set and ready to go.

If we need to make any further changes to the Content Type or Attributes, then we can do this in the same process and Re-Publish into SharePoint.

Having our Metadata ready in Dynamics and SharePoint is useful, but often we have the requirement for Metadata to be pre-populated in SharePoint based on attributes in CRM – our next article will look at how we configure these Mappings in DocMan to specify that each Document uploaded to a Record in Dynamics then uses the record to pre-populate starting values for the Metadata.

For further reading on DocMan and the potential for integrating SharePoint, Cognitive Services and Dynamics together we have the following dedicated area here.

The following article on Content Types at different levels in the Site Hierarchy may also be useful reading on SharePoint Content Types: http://www.crmcs.co.uk/content/where-s-my-content-type.aspx

Prefer to go old-school?

Write to us using the below addresses.

Head Office
CRM Consultancy
61 Oxford Street
Manchester
M1 6EQ

London Office
CRM Consultancy London
Grosvenor Avenue
London

Content © CRM Consultancy.