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

Dynamics 365 Marketing vs ClickDimensions It’s time to pause, reflect and acknowledge a new era of inclusivity and collaboration. Part 2 - How to get the most from a Technology Expert – Asset Management Hub Property & Asset Management Hub Part 1 – Balancing CRM and Asset Management Scopes - Asset Management Hub Creating a Multi-Lingual PowerApps Portal How to Set Up a Microsoft Teams Site Using DocDrive365 Microsoft Teams - Adding a Microsoft Teams URL to a Dynamics Appointment Dynamics 365 Marketing – Customer Voice Survey Not Appearing In Emails? Using SQL Management Studio to connect to the Dynamics DB Calling a Power Platform AI Builder Model via oData How to use DocDrive365 to integrate permissions between Business Units in Dynamics with Sites in SharePoint Getting started with the Power Platform AI Builder. Power Apps Portal Information Hub DocDrive365 Security: Day One - Getting Started with Dynamics to SharePoint Permissions Part 5 - Power Apps Portals: How To Connect Azure B2C With Linked-In Part 4 – Power Apps Portals: Styling Azure B2C for Power Apps Portals The 3 Phases for Using Multi-Select Option Sets in Flow with Microsoft Forms Part 3 – PowerApps Portals: Azure B2C and Power Apps Portals – User Flow for Signup and Signin Part 2 - Power Apps Portals: New Application Registration in Azure B2C for our Power Apps Portal Part 1 – Power Apps Portals: Creating a New Azure AD B2C Tenant The Automation Bot: Launching Contextual Flow from Teams Creating a New Bot for Teams Debugging your Teams Bot using Ngrok Adding a Microsoft Teams URL to a Dynamics Appointment
Contact Us

Want expert advice or a demo?

Get in touch now and see how we can help your business grow.

  • Name
  • Email Address
  • Phone Number

Understanding Your Challenges

Our strong understanding of CRM and emerging technologies within the Microsoft environment means we deliver the right solutions for you.

Proven Real-World Solutions

As a leader in the field of Dynamics solutions, our pedigree developing and delivering real-world solutions is unsurpassed.

Long Term Support

We provide support beyond our design, implementation and 'go-live' delivery using Sprints and continual updates to our AppSource apps.

CRMCS | Design by Thinktank Marketing | Citrus-Lime Limited

To improve your experience today and in the future, this site uses cookies. Read our full Privacy Policy & Cookie information here I Understand