Troubleshooting - REFRACT Platform for Dynamics 365 Sales
Diagnose and resolve common REFRACT Platform CRM issues. Security role errors, environment variable misconfigurations, plugin failures, SharePoint connectivity, workflow enforcement, and batch operation problems.
Quick Diagnostics
Use this flowchart to identify common issues quickly:
-
Do Command Bar buttons appear on CRM records?
- No → See Command Bar Buttons Not Visible
- Yes → Continue
-
Does clicking a button return an access error?
- Yes → See Security Role Issues
- No → Continue
-
Does the Template Gallery open but show no templates?
- Yes → See Template Gallery Is Empty
- No → Continue
-
Does document generation fail?
- Yes → See Document Generation Failures
- No → Continue
-
Is workflow enforcement blocking CRM operations unexpectedly?
- Yes → See Workflow Enforcement Issues
- No → Setup is working correctly
Command Bar Buttons Not Visible
Symptom: "No Vault buttons appear on Quote, Opportunity, or Account records"
The managed solution may not be installed in the correct environment, or the Command Bar customisations have not propagated.
Verify the Managed Solution Is Installed
- Open Power Platform Admin Center
- Select the target environment → Solutions
- Confirm VaultPlatform D365 Sales is listed with status Installed
If the solution is not listed, import it from the solution file provided by Refract Logic.
Hard Refresh the Browser
- Close all Dynamics 365 tabs
- Open a new tab and navigate to Dynamics 365
- Open a Quote or Opportunity record
- Check for the Command Bar buttons
Command Bar customisations load from the server-side metadata cache. A hard refresh forces the browser to reload this cache.
Verify Command Bar in App Designer
If buttons are still missing after a hard refresh:
- Open Power Apps (make.powerapps.com)
- Select Apps → find and open the model-driven app your sales team uses (e.g. Sales Hub)
- Click Edit → navigate to the relevant entity form (Quote, Opportunity, etc.)
- In the Command Bar editor, confirm Vault actions are present
If buttons are missing from the App Designer, the managed solution may need reimporting into the correct environment.
Security Role Issues
Symptom: "Access denied" when clicking a Command Bar button
The user does not have the Vault User security role assigned.
Assign the Vault User Security Role
- In Dynamics 365, navigate to Settings → Security → Users
- Open the affected user's record
- Click Manage Roles
- Check the Vault User role and click OK
The role is included in the managed solution. If it does not appear in the role list, the solution may not be installed correctly.
Verify the Role Exists
- Navigate to Settings → Security → Security Roles
- Confirm Vault User appears in the list
- If missing, reimport the managed solution - the role is delivered as part of the solution package
Sign Out and Sign Back In
Security role changes take effect after the user's next sign-in. Ask the affected user to sign out of Dynamics 365 and sign back in.
Template Gallery Is Empty
Symptom: "The Template Gallery shows no templates when [Process Document] is clicked"
No templates are assigned to the current entity, or all templates are inactive.
Confirm Templates Exist
- Open Power Apps, select your environment, and navigate to Tables. Search for
vault_template - Navigate to Templates
- If the list is empty, create at least one template. See the main setup guide for steps.
Check Template Is Active
- In the Templates list, confirm Is Active is Yes for the relevant template
- Inactive templates are excluded from the gallery even if assigned
Verify Template Assignment
- In Power Apps → Tables, open vault_templateassignment
- Confirm an assignment exists for the relevant template with the correct Entity Logical Name
Example: For Quotes, the entity logical name is quote (all lowercase). If the assignment uses Quote or Quotes, it will not match.
Check Context Setting
- On the Template Assignment record, confirm Context is set to
form,view, orboth - If Context = view and the user is on a record form, the template does not appear
- Adjust the context to
bothto make the template available in all locations
Document Generation Failures
Symptom: "An error occurred while calling the Dispatcher" after clicking Generate
The plugin cannot authenticate with or reach the Dispatcher.
Verify Dispatcher Environment Variables
- In Power Platform Admin Center, open the environment → Solutions → VaultPlatform D365 Sales → Environment variables
- Confirm all four Dispatcher variables are populated:
vault_dispatcher_baseurlvault_dispatcher_tenantidvault_dispatcher_clientidvault_dispatcher_clientsecret
All four must have current values. An expired or missing vault_dispatcher_clientsecret is the most common cause of authentication failures.
Rotate the Dispatcher Client Secret
- In Azure Portal, open App Registrations → the Dispatcher app registration
- Click Certificates & Secrets
- Check the Expires date on the secret in use
- If expired, click New client secret - set expiry to 24 months and copy the Value
- Update
vault_dispatcher_clientsecretin Power Platform with the new value
Value, Not Secret ID
Copy the secret Value, not the Secret ID. The Value is shown only once at creation time.
Test Dispatcher Reachability
Ask your network or Azure team to confirm:
- The Dispatcher Function App is running
- Outbound HTTPS connections from Dataverse to the Dispatcher domain are allowed
- The Dispatcher base URL (
vault_dispatcher_baseurl) is correct and reachable
Symptom: "SharePoint upload failed with 403 Forbidden"
The plugin cannot authenticate with Microsoft Graph or lacks write permission on the SharePoint library.
Verify Graph Environment Variables
- Confirm all four Graph variables are populated:
vault_graph_tenantidvault_graph_clientidvault_graph_clientsecretvault_graph_driveid
An expired vault_graph_clientsecret or incorrect vault_graph_driveid causes 403 errors.
Check Azure AD App Permissions
- In Azure Portal, open App Registrations → your Graph API app
- Click API permissions
- Confirm
Sites.ReadWrite.Allis listed with status Granted for your tenant
If status shows "Needs admin consent":
- Click Grant admin consent for [your tenant]
- Confirm in the dialog
Verify the Drive ID
- Use Microsoft Graph Explorer
- Authenticate with your Azure AD account
- Run:
GET /sites/{siteId}/drives - Find the drive for your output document library and copy its
id - Update
vault_graph_driveidwith this value
A Drive ID from the wrong library or a SharePoint site ID (not a drive ID) causes upload failures.
Symptom: "Template not found" error from the Dispatcher
The Dispatcher cannot locate the template file in SharePoint.
Verify Template Variant ID
- In Power Apps → Tables, open vault_template and find the relevant template
- Check the Template Variant ID field - this must match the exact filename/path used in the Vault template library
- Confirm with your Refract Logic deployment contact that the template is published to SharePoint
Verify SharePoint Template Library Access
The same Graph API app registration must have read access to the templates library. Confirm Sites.ReadWrite.All is granted - this covers both read and write access.
Workflow Enforcement Issues
Symptom: "Operation blocked by REFRACT Platform" when activating a Quote or closing an Opportunity
The VaultWorkflowEnforcerPlugin is blocking the operation because a pending workflow is detected.
Sync the Workflow Status
- Open the blocked CRM record
- Click [Sync Workflow Status] in the Command Bar
- Check the dialog for the current workflow state
If the workflow is Complete, the enforcer will allow subsequent operations. If the workflow is still In Progress, the enforcer correctly blocks the operation until the workflow completes.
Check Enforcement Mode on the Template
- In Power Apps → Tables, open vault_template
- Find the template used to generate the document on this record
- Check Workflow Enforcement Mode:
Block- CRM operation is prevented until workflow is completeValidate- Warning is shown, but the operation is allowed to proceedNone- No enforcement
If enforcement mode is too restrictive for this use case, update it to Validate or None.
Enforcement Is Set at Generation Time
The enforcement mode stored in vault_documentlink is copied from the template at the time the document was generated. Changing the template's enforcement mode does not retroactively change the mode stored on existing document links. Regenerate the document to apply a new enforcement mode.
Clear a Stale Workflow Link
If a workflow was abandoned and the document link is blocking operations incorrectly, an administrator can update vault_documentlink.workflowState to complete directly in Dataverse (Advanced Find or a custom admin page). This releases the enforcer block.
Contact enterprise@vaultpdf.io if you need a supported admin utility for this operation.
Workflow Status Issues
Symptom: "Sync Workflow Status shows 'Workflow not found'"
The Dispatcher has no record of the workflow ID stored in vault_documentlink.
Verify the Workflow Was Triggered
Workflow routing requires the template to have Workflow Enabled = Yes and at least one workflow recipient configured. If these were not set at generation time, no workflow was created - regenerate the document with a correctly configured template.
Check for Workflow Expiry
REFRACT Platform workflows expire after a configured period (default: 7 days for e-signature). If the workflow has expired, the Dispatcher discards the workflow instance.
Regenerate the document to initiate a new workflow.
Symptom: "Workflow recipients do not receive invitations"
The workflow was triggered but recipients did not receive an email notification.
Verify Recipient Configuration
- In Power Apps → Tables, open vault_templaterecipient
- Confirm at least one recipient has Recipient Type = Workflow and a valid email address
- Check for typos in the email address
Check Dispatcher Workflow Logs
Contact enterprise@vaultpdf.io with:
- Document ID
- Timestamp of generation
- Recipient email address
Dispatcher logs reveal whether the workflow engine received the request and what the email delivery service returned.
Batch Operation Issues
Symptom: "Process Document does nothing when multiple records are selected"
The batch Command Bar button may not be configured for the list view context.
Verify Template Assignment Context
- In Power Apps → Tables, open vault_templateassignment
- Find the assignment for the relevant entity
- Confirm Context is set to
vieworboth
Templates assigned with Context = form do not appear in list view batch operations.
Check Dispatch Mode
Only templates with Dispatch Mode set to Per Record or Single Array are meaningful for batch operations from a list view.
A Standard (single-record) template generates one document from the first selected record. If batch behaviour is expected, update the template's Dispatch Mode.
Symptom: "Batch fails with 'record limit exceeded'"
More than 100 records were selected. The plugin blocks batch operations above this threshold.
Reduce the Selection
Select 100 or fewer records and rerun the batch operation.
For large volumes, consider splitting the selection into multiple smaller batches or contacting enterprise@vaultpdf.io to discuss scheduled processing options for high-volume scenarios.
Adjust the Batch Threshold (Optional)
The 100-record limit is stored as a Dataverse Environment Variable. If the default threshold does not suit your deployment, contact your implementation team or enterprise@vaultpdf.io to adjust the threshold Environment Variable value.
Performance and Timeout Issues
Symptom: "Process Document hangs for over 30 seconds before failing"
If Process Document regularly takes longer than 15 seconds, a configuration problem is likely rather than template complexity.
Check for a Missing or Misconfigured Dispatcher URL
A wrong vault_dispatcher_baseurl will cause the connection to hang until Dataverse times out the operation.
- Verify
vault_dispatcher_baseurlis set correctly in Environment Variables - Confirm the Dispatcher Function App is running in Azure Portal
- If the URL is correct but the Dispatcher is down, contact enterprise@vaultpdf.io with the error detail from the Plugin Trace Log
Check SharePoint Upload Performance
Slow SharePoint uploads are the most common cause of long execution times. Common causes:
- The SharePoint Drive ID points to a library in a different region from the Dataverse environment
- Transient Microsoft Graph throttling (HTTP 429)
If SharePoint uploads are consistently slow, contact enterprise@vaultpdf.io for guidance.
Symptom: "User sees a spinner for 10+ seconds on Process Document"
This is expected behaviour for complex templates. Process Document uploads the record payload to SharePoint, then calls the Dispatcher to render the PDF before returning to the user. The Dispatcher render call is the largest variable.
| Operation | Typical duration |
|---|---|
| SharePoint payload upload | 500ms - 3s |
| PDF generation (Dispatcher) | 2 - 20s depending on template complexity |
| Total | ~5 - 25 seconds |
For the other three actions (Open Document, Sync Workflow Status, Get Signed Document), typical execution is 1 - 3 seconds.
If response time is a concern, discuss template complexity with your Refract Logic contact. Simpler templates with fewer conditional sections render in under 5 seconds.
Plugin and Solution Issues
Symptom: Plugin errors appear in Dataverse Plugin Trace Logs
Enable Plugin Trace Logging
- In Dynamics 365, navigate to Settings → Administration → System Settings
- On the Customization tab, set Enable logging to plug-in trace log to All
- Retry the failing action
- Navigate to Settings → Plugin Trace Log to view error details
Disable After Troubleshooting
Plugin trace logging generates significant data. Disable it after troubleshooting by setting it back to Off or Exception.
Common Plugin Errors
| Error | Cause | Resolution |
|---|---|---|
NullReferenceException on vault_graph_driveid | Environment variable is empty | Populate vault_graph_driveid |
HTTP 401 from Dispatcher | Dispatcher credentials expired or incorrect | Rotate vault_dispatcher_clientsecret |
HTTP 403 from Graph API | Graph App Registration lacks admin consent | Grant admin consent for Sites.ReadWrite.All |
No vault_templateassignment found | Template not assigned to this entity | Create a Template Assignment for the entity |
vault_documentlink not found | Open Document or Sync Status called before Process Document | Run Process Document first |
Symptom: Managed solution upgrade fails or causes data loss
Always Use Managed Solution Imports for Upgrades
Upgrading by importing a new managed solution version preserves all existing Dataverse table data. The import process performs a schema upgrade, adding new columns or tables as needed.
Do not delete the solution before importing the new version - this removes all template configuration data.
Back Up Configuration Before Upgrading
Before importing a new solution version:
- Export your template configuration as a Dataverse export or use Power Platform Dataflows
- Document your Environment Variable values (except secrets)
- Confirm with your implementation team that the new version is backward-compatible with existing template variant IDs
Common Questions (FAQ)
Q: Can REFRACT Platform for Dynamics 365 Sales be used without Business Central?
A: Yes. This integration is completely standalone. It requires only a Dynamics 365 Sales environment, a Vault Dispatcher deployment, and Microsoft Graph access. There is no dependency on Business Central or any ERP.
Q: Can I add Vault to custom entities or entities not in the initial list?
A: Yes. The plugin works generically for any Dataverse entity. Add a Command Bar customisation for the target entity in a solution update and create template assignments for it - no plugin code changes are required.
Q: Why does the first "Process Document" of the day take 20 - 30 seconds, but subsequent ones are much faster?
A: This is a Dispatcher cold start. The Vault Dispatcher is an Azure Function App. On the Consumption hosting plan, Azure spins down the Function App after a period of inactivity (typically 5 minutes). The next invocation - usually the first document of the morning - pays a cold start penalty of 8 - 10 seconds before the function begins processing. Once warm, subsequent calls render PDFs in 2 - 5 seconds for typical templates.
Total time including cold start (8 - 10s) and rendering (5 - 15s) remains well within Dataverse's plugin execution limit. It is a noticeable delay but not an error.
To eliminate cold starts, ask your Azure administrator to change the Dispatcher hosting plan:
| Plan | Cold start | Recommendation |
|---|---|---|
| Consumption (default) | 8 - 10s after idle | Acceptable for low-frequency usage |
Flex Consumption with minimumInstanceCount: 1 | Eliminated | Best value - small always-on charge, no cold starts |
| Premium EP1 with min instances = 1 | Eliminated | For high-volume environments with strict latency requirements |
Setting minimumInstanceCount: 1 on Flex Consumption keeps one instance warm at all times for a fraction of the cost of a full Premium plan. Contact enterprise@vaultpdf.io to change the Dispatcher hosting configuration.
Q: Can I use the same App Registration for both Graph API access and the Dispatcher?
A: Technically possible, but not recommended. Use separate App Registrations for Graph API and the Dispatcher to follow the principle of least privilege and simplify credential rotation.
Q: How long are generated PDFs stored in SharePoint?
A: PDFs remain in SharePoint until manually deleted. Apply your organization's document retention policy using SharePoint retention policies or archive strategies.
Q: What happens if I delete a template that has already been used to generate documents?
A: Existing PDFs in SharePoint and existing vault_documentlink records are not affected. Document links remain readable. The deleted template no longer appears in the gallery, so no new documents can be generated with it. Recreate the template if ongoing document generation is needed.
Q: Can multiple CRM users generate documents from the same record simultaneously?
A: Dynamics 365 does not lock records during document generation - multiple users can trigger the action at the same time. Each invocation creates its own vault_documentlink entry (latest-wins for each link type). For workflows, this may result in multiple workflow instances. Coordinate with users to avoid parallel invocations on the same record.
Q: How do I migrate template configuration between environments (dev to production)?
A: Template configuration is stored in Dataverse tables (vault_template, vault_templatefield, etc.). Export these tables from the source environment using Power Platform Dataflows, Configuration Migration Tool, or a custom export, then import into the target environment. Environment Variables must be set per environment - they are not included in configuration exports.
Q: How do admins access the Vault template configuration tables?
A: Template configuration is stored in standard Dataverse custom tables. Access them via Power Apps → select your environment → Tables, then search for vault_. Alternatively, use Advanced Find in Dynamics 365 Sales and search within the vault_template, vault_templatefield, or vault_templateassignment tables. End users interact only with the Command Bar buttons on their standard CRM forms - they do not need access to the vault_ tables directly.
Developer Guide - REFRACT Platform for Dynamics 365 Sales
Technical architecture, detailed action flows, Dataverse table schemas, Custom API and plugin reference, batch dispatch modes, workflow enforcement, and deployment/ALM for the REFRACT Platform CRM integration.
REFRACT Platform Connector for Power Platform
Connect Power Automate and Power Apps to your organization's REFRACT Platform Dispatcher. Generate PDFs, send documents for e-signature and approval workflows, and retrieve sealed documents - without writing code.