We recently faced an unexpected issue while configuring a DocumentsCorePack template for Dynamics 365.
Our template was based on the Quote table. We needed to retrieve records from a related custom table called Component Configuration (a sample table that I created).
The relationship existed in Dataverse, but it did not appear in the DocumentsCorePack Relationship Designer.
Quote → Component Configuration
We updated the metadata through the DocumentsCorePack Data Provider, but the relationship was still missing.
The solution was to remove the locally cached metadata for the affected Dynamics 365 environment and allow DocumentsCorePack to rebuild it.
Here is the complete troubleshooting process.
We needed to use fields from Component Configuration inside the Quote document. DocumentsCorePack supports standard and custom Dataverse tables, so the relationship should have appeared in the Relationship Designer.
To configure a relationship:
- Open the Word template.
- Open the DocumentsCorePack Template Designer.
- Go to the Relationships or Additional section, depending on the DCP version.
- Select Add Relationship/Entity.
- Choose the required relationship type.
- Search for the relationship.
- Add the relationship and select the required fields.
The Relationship Designer provides different relationship categories:
- N:1 lookups
- 1:N relationships
- M:N relationships
- Separate tables
Figure 1: The official DocumentsCorePack Relationship Designer. Source: MSCRM-Addons documentation.
In our case, the relationship between Quote and Component Configuration was not listed.
Why the relationship might be missing
The DocumentsCorePack Template Designer does not retrieve the complete Dataverse metadata every time the designer is opened.
It stores metadata locally to improve performance.
This cache includes information about:
- Tables
- Columns
- Relationships
- Lookup fields
- Option sets
- Other Dataverse configuration
If a custom table, field or relationship was created or changed after the metadata was downloaded, the local DCP cache might not contain the latest definition.
Normally, updating the metadata should resolve this.
Step 1: Update the metadata
DocumentsCorePack can detect metadata changes automatically. According to the official documentation, the default configuration performs a timestamp check periodically and can prompt the user when changes are found.
Metadata can also be refreshed manually.
Open the DocumentsCorePack Data Provider menu and select Update Metadata.
Figure 2: Update Metadata from the DocumentsCorePack Data Provider. Modern UI illustration based on the official DCP workflow.
After updating the metadata:
- Close the Template Designer.
- Reopen the template.
- Open the Relationship Designer.
- Search for the custom relationship again.
For many metadata-related issues, this should be sufficient.
However, it did not resolve our issue.
The Component Configuration relationship was still missing.
Step 2: Force DocumentsCorePack to rebuild the metadata
After further troubleshooting and discussions with the DocumentsCorePack support team, we cleared the locally stored metadata.
The default metadata-cache location is:
%APPDATA%\DCP\metadata
This normally resolves to:
C:\Users\<username>\AppData\Roaming\DCP\metadata
Before deleting anything:
- Close every Microsoft Word window.
- Close the DocumentsCorePack Data Provider.
- Confirm that neither application is still running.
This is important because DocumentsCorePack might continue using or locking the cached files while Word or the Data Provider remains open.
Step 3: Identify the correct environment folder
The metadata directory can contain folders for multiple Dynamics 365 environments.
Figure 3: Identifying the correct environment under %APPDATA%\DCP\metadata. Modern UI illustration.
If the computer connects to multiple Dynamics 365 environments, do not remove every folder without first identifying the correct one.
Use the environment’s unique name to determine which folder belongs to the affected environment.
The environment unique name is different from:
- Environment ID
- Organisation ID
- Environment display name
- Dynamics 365 URL
It can be found in the environment’s Developer Resources.
For an online Dataverse environment:
- Open the Power Apps maker portal.
- Select the correct environment.
- Open Settings.
- Select Developer resources.
- Find the Environment unique name.
Match this value with the appropriate folder in the DCP metadata location.
Step 4: Delete the cached metadata
Once the correct environment folder has been identified, delete that environment’s cached metadata folder or the files contained inside it.
Figure 4: Removing only the affected environment’s cached metadata. Modern UI illustration.
Avoid deleting metadata belonging to another Dynamics 365 environment unless you intentionally want that environment’s cache to be rebuilt as well.
Deleting this folder does not delete:
- Dataverse tables
- Dataverse relationships
- Dynamics 365 records
- DocumentsCorePack templates
- Server-side configuration
It removes only the locally cached metadata used by the DocumentsCorePack client on that computer.
Step 5: Regenerate the metadata
After deleting the cached metadata:
- Restart Microsoft Word.
- Restart the DocumentsCorePack Data Provider.
- Open the affected template.
- Allow DocumentsCorePack to download the metadata again.
- Use Update Metadata if it is not refreshed automatically.
- Open the Relationship Designer.
- Search for the custom relationship.
After rebuilding the metadata, the relationship between Quote and Component Configuration appeared correctly.
We could then add the relationship and use the custom table’s fields in the document.
Why Update Metadata alone did not fix it
The manual Update Metadata action normally refreshes the local metadata.
In our case, the local metadata cache appears to have remained incomplete or stale. The normal refresh did not replace the problematic cached information correctly.
Deleting the environment-specific cache forced DocumentsCorePack to download a fresh metadata set instead of continuing to use the existing copy.
The difference is:
| Action | What it does |
|---|---|
| Update Metadata | Refreshes the existing local metadata |
| Delete cached metadata | Forces DCP to recreate the local metadata from the environment |
This is why deleting and regenerating the metadata succeeded when the normal update did not.
Summary of what we did in sequence
If a Dataverse table, column or relationship is missing from DocumentsCorePack:
- Confirm that the table or relationship exists in Dataverse.
- Publish all Dataverse customisations.
- Confirm that the DCP user has access to the custom table.
- Run Update Metadata from the DCP Data Provider.
- Close and reopen Word and the Template Designer.
- Search under the correct relationship category.
- If it is still missing, close Word and the Data Provider.
- Open
%APPDATA%\DCP\metadata. - Identify the correct folder using the environment unique name.
- Delete the affected environment’s cached metadata.
- Restart Word and the DCP Data Provider.
- Regenerate the metadata and test again.
Final thoughts
When a custom relationship is missing from DocumentsCorePack, the problem might not be with the Dataverse relationship itself.
It could simply be that the Template Designer is working with an outdated or incomplete local metadata cache.
Start with Update Metadata.
If that does not work, rebuild the environment-specific metadata cache.
That small step resolved an issue that initially looked like an unsupported custom relationship or an incorrect Dataverse configuration.
Official documentation:



