Support Portal ContactGet in touch

Synchronising Record Names from Dynamics to SharePoint

   Words by Paul McQuillan

   on 06/03/2019 18:00:00

When we integrate our SharePoint Structures with Dynamics, this can give us a problem if a Record in Dynamics is renamed and this change is not reflected in SharePoint.

DocMan for Dynamics caters for this by automatically updating SharePoint when the record in Dynamics changes.

This is done in two steps:

Step 1 – Rename the Site, Library or Folder in SharePoint if any of the Fields involved in the Name have been updated

Step 2 – Refresh Metadata in the Documents if any Fields involved in Metadata have been updated

To maintain performance, this takes place Asynchronously and so takes a few seconds for the Location to be renamed in SharePoint.

Renaming a Record in Dynamics

An an example, if we take an Agenda Item tracked in CRM with a number of Documents:


The Title of the Folder in SharePoint being built from the [Subject] and [Item Number] of the Agenda Item.

We then change the Subject and Item Number in Dynamics and SAVE:


This starts the process in DocMan that picks up on these Fields being used in the SharePoint Location Title, and so rename the Location accordingly and Republish down the Metadata.

As this takes place Asynchronously, we can see this by pressing F5 to refresh the Agenda Item in Dynamics:


To see this in SharePoint, we can click LOCATION to open the Document Location in SharePoint:


If we have a set of Agenda Items associated to a Meeting in Dynamics, we can jump up one level in SharePoint to see all the Agenda Item Folders for that Meeting:


What constitutes a Rename?

Obviously not all fields in Dynamics will trigger an action in SharePoint – so the DocMan logic looks at the CRM Fields referenced in the Maps in the DocMan Configuration for that Entity.

This comes from the Dynamic Map and the Bucket Map for this Entity.

These define what (if any) CRM Fields are used when building the Name of the Location in SharePoint.

DocMan then looks for when these Fields in particular are updated in Dynamics to then trigger this Pass-Rename-To-SharePoint logic. (and so if other non-naming fields are updated, nothing happens to slow performance!)

In the example below, this configures DocMan for a Custom Applicant Entity and defines that the SharePoint Folder should be built from both the Applicant’s Firstname and Lastname Fields:


This means that any change to the Firstname (crmcs_firstname) or Last Name (crmcs_lastname) will be considered a Rename of the Record and so reflected into SharePoint.

Once configured in the DocMan Configuration Area for the Applicant or Agenda Item Entity, this will then capture the event and update SharePoint accordingly.

Deletions in Dynamics

If instead of Renaming a Record in Dynamics we instead opt to completely remove a Record by deleting it – this triggers a similar process in DocMan.

However instead of Renaming the Location in SharePoint, this deletes the SharePoint Location for that Record.

This can be dangerous (and so initially defaults to NO in our DocMan Settings for an Entity) but can also be very useful for meeting our GDPR Obligations for completely removing Personal Information for an Individual across both Managed Data in CRM and Documents in SharePoint.

Taking our above example of an Agenda Item linked to a Meeting – if we delete the Agenda Item Record in Dynamics and then re-open SharePoint, we will see that Folder removed from the Meeting:


Controlling Events in DocMan

Often we will want this Rename and Deletion functionality activated for an Entity we have connected from Dynamics to SharePoint.

However we may want to control this behaviour Entity by Entity and the DocMan Configuration Area allows us to do this:


Here we can control what happens when:

  • New Record is Created in Dynamics for this Entity
  • Existing Record is Renamed in Dynamics
  • Whether to Re-Publish Metadata into SharePoint Documents when Fields are changed in CRM?
  • Existing Record is Deleted

These by-event settings are further described here: Controlling Entity Events in DocMan

Share this Article

Search Articles

Filter Articles

CRM Tech DocMan

Recent Articles

CRMCS Quick Start Guide: How To Produce a Microsoft Teams Live Event Dynamics 365 Marketing: Lead Scoring and Sales Acceptance Designing and Developing Microsoft Power Apps Portals Thank You for Attending CRMCS’ Webinar - Achieving B2B sales excellence with Dynamics 365 & Microsoft Teams Thank You for Attending Our Webinar - Achieving B2B sales excellence with Dynamics 365 & Microsoft Teams Webinar: Discover How CRMCS Have United Dynamics 365, SharePoint and Microsoft Teams To Create Sales Excellence Ignite your workflow by adding DocDrive365 to Office 365 The CRMCS guide to everything you need to know about integrating Teams with Dynamics 365 Saving Time By Keeping Documents In One Place TDE Database Encryption with On Premise Dynamics The Key to Successful Compliance in 2020 Part 2: Let’s get GDPR Compliant with Microsoft Power Automate Top 3 Essential Tips for Remote Working Dynamics 365 Marketing: Top 5 Best Features Dynamics Day in the Life - Puma Investments Can you use Teams to amplify collaboration in Dynamics? Part 1: Using a Scheduled Power Automate to Trigger Expiry Date Reminders The secrets of successful document collaboration in Dynamics CRMCS launches new AppSource approved DocDrive365 Dynamics Day in the Life - Moneypenny Release Management Add the App to Dynamics DocDrive365 Security: Day One - Getting Started with Dynamics to SharePoint Permissions Building a New Scheduled Process using Flow
  • "Paul has made a real difference to how my team of 24 people record and store valuable customer data and sales opportunities. Highly recommended."

    James, Operations Director

  • "Understanding your business allows us to advise when to implement aspects of CRM and, likewise, when not to."

    Paul McQuillan, Managing Director

  • "Dynamics 365 and CRMCS have made a real lasting difference to our business, allowing us to replace older systems that were holding back our performance."

    Grahame, Chief Operating Officer

  • "James worked well with us to help connect CRM with Outlook and relate how this might benefit our team using CRM for Property Care."

    Natalie, Property Care Supervisor

  • "Matt was really good with helping us run User Testing on the new Compliance Module of our CRM System."

    Tom, Compliance Administrator

Prefer to go old-school?

Write to us using the below addresses.

Head Office
CRM Consultancy
61 Oxford Street
M1 6EQ

London Office
CRM Consultancy London
Grosvenor Avenue

Content © CRM Consultancy.