Support Portal ContactGet in touch

DocDrive365 Day Three: Opportunities and Bucket Folders

   Words by Paul McQuillan

   on 15/11/2019 10:00:00

We have seen how DocDrive can create new Document Libraries and Folders for records in Dynamics, and how related records can form the structure for how our documents are stored.

We can also look at the concept of ‘bucket’ folders that can build not just a Folder for a Record, but also other ways of dividing record’s into a logical set of document locations.

So we could potentially divide how we store the Documents for Opportunities by the Type of Opportunity,  or by the Month or Year when the Opportunity was created – this helps keep our Document Structures manageable and governable, and avoid the problem of having a big long list of Folders that can make navigation more difficult.





Lookup Rule

Link up to the Parent Account


Link up to the Parent Account


Bucket Rule

Group Folder by Opportunity Type

New Business

Group Folder by Year


Record Rule

Folder per Opportunity

Equipment Supply

Folder per Ticket Number


Before we look at how this is done for Opportunities in the initial DocDrive Configuration, we can actually see this concept in the definition of the earlier Account Entity.


Here we can see the top DS3 Rule defining a ‘bucket’ location to use before the DS4 Rule then creates a Folder per Account.

Drilling down into this rule gives us a basic definition to use or create a Document Library in SharePoint as the bucket, and that this Document Library should be created with a simple fixed title of ‘Client Documents’.


Looking at Opportunities, we can also see this bucket rule concept in evidence with each Opportunity we open.

Picking an Opportunity and clicking LOCATION in the DocDrive Panel or the Dynamics Documents List will show us the following way we have defined for Opportunities to be managed:


We can see that the Opportunity’s Document Location is being built via:

1. DS2 - Parent Rule looking up to the Folder for the Company Account

2. DS3 - Bucket Rule defining that all Opportunity Folders should be tracked in a fixed folder for ‘Opportunities’

3. DS4 - Record Rule adding a new Folder for each Opportunity

This structuring is available in the DocDrive Entity definition for Opportunity – as we can see our respective three rules in the definition:


This is a similar ‘fixed’ bucket to put our Opportunity Record Folders in.

However we can change this to start using a non-fixed Bucket Folder that would instead depend on a Field in the Opportunity record itself – so say we wanted to model the scenario where our Opportunities were sub-divided by the Currency involved in the Opportunity, then we would amend our Bucket Rule to create a Folder based on the ‘transactioncurrencyid’ field of the Opportunity.

To do this, we would change the [Map Type] from ‘Fixed Mapping’ to ‘Field Mapping’, and set the [CRM Field] to the Database Name of the Field we want to use.

We can also reset the [Template / Fixed Value] to use the CRM Field we want to bring in – so we can set this to ‘{0} Sales’ as way of using the value of the Currency Field and then following with Sales so the resulting Folder is clear.

The [Data Type] we can leave as String in this incidence, as this will simply ask DocDrive to interpret the Lookup Text of the Currency Field using its Text/String definition:


NOTE: This type of mapping and choosing whether to use the Value or Text of the Field can be done for Option Sets, Lookups, Dates or any other type of Field we track within Dynamics.

With this in place in the DocDrive Configuration – we can see this in action.

If we create a New Opportunity and set the currency to ‘US Dollar’, we will see this reflected in SharePoint as {Account Name} >> US Dollar Sales >> {New Opportunity Name}


This gives us a way of sub-dividing groups of Opportunities within the structure of the Parent Customer Account – if this is useful to us.

This concept of a Dividing Folders or Document Libraries by a Bucket can be put to use in a variety of scenarios to help ensure we get the structure of Document Management right between our Records in Dynamics and SharePoint.

Do Changes to the DocDrive Configuration take effect immediately?

Yes – DocDrive does a range of caching behind the scenes, but refreshes this cache when a change is recorded to the DocDrive Entity or Rule records.

What happens to existing Records and SharePoint Folders?

Nothing happens for already existing records – any rule changes in DocDrive update the logic for new records being added to Dynamics, but do not change existing records.

This is to keep the consistency of existing Links and SharePoint Locations even when the Rules change; and corresponds to how Dynamics stores the Document Locations to associate Records in Dynamics to SharePoint Locations.

This gives an initial view of Bucket Rules to work in tandem with Record Rules, we will see this again when looking at the Case Entity in the initial configuration from the DocDrive Wizard and how this uses the Date of the Case as a Bucket Rule.

This configuration allows to configure what happens up the chain in terms of the Lookup to Rule and now this Bucket Rule, but we can also look at down the chain in terms of having Sub-Folders from our record.

But before we do, it may be useful to reference a quick guide for how records in Dynamics can be renamed or deleted to update the Location in SharePoint.

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.