REFRACT Platform for Dynamics 365 Sales

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:

  1. Do Command Bar buttons appear on CRM records?

  2. Does clicking a button return an access error?

  3. Does the Template Gallery open but show no templates?

  4. Does document generation fail?

  5. Is workflow enforcement blocking CRM operations unexpectedly?


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

  1. Open Power Platform Admin Center
  2. Select the target environment → Solutions
  3. 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

  1. Close all Dynamics 365 tabs
  2. Open a new tab and navigate to Dynamics 365
  3. Open a Quote or Opportunity record
  4. 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:

  1. Open Power Apps (make.powerapps.com)
  2. Select Apps → find and open the model-driven app your sales team uses (e.g. Sales Hub)
  3. Click Edit → navigate to the relevant entity form (Quote, Opportunity, etc.)
  4. 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

  1. In Dynamics 365, navigate to Settings → Security → Users
  2. Open the affected user's record
  3. Click Manage Roles
  4. 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

  1. Navigate to Settings → Security → Security Roles
  2. Confirm Vault User appears in the list
  3. 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.


No templates are assigned to the current entity, or all templates are inactive.

Confirm Templates Exist

  1. Open Power Apps, select your environment, and navigate to Tables. Search for vault_template
  2. Navigate to Templates
  3. If the list is empty, create at least one template. See the main setup guide for steps.

Check Template Is Active

  1. In the Templates list, confirm Is Active is Yes for the relevant template
  2. Inactive templates are excluded from the gallery even if assigned

Verify Template Assignment

  1. In Power Apps → Tables, open vault_templateassignment
  2. 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

  1. On the Template Assignment record, confirm Context is set to form, view, or both
  2. If Context = view and the user is on a record form, the template does not appear
  3. Adjust the context to both to 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

  1. In Power Platform Admin Center, open the environment → Solutions → VaultPlatform D365 Sales → Environment variables
  2. Confirm all four Dispatcher variables are populated:
    • vault_dispatcher_baseurl
    • vault_dispatcher_tenantid
    • vault_dispatcher_clientid
    • vault_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

  1. In Azure Portal, open App Registrations → the Dispatcher app registration
  2. Click Certificates & Secrets
  3. Check the Expires date on the secret in use
  4. If expired, click New client secret - set expiry to 24 months and copy the Value
  5. Update vault_dispatcher_clientsecret in 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

  1. Confirm all four Graph variables are populated:
    • vault_graph_tenantid
    • vault_graph_clientid
    • vault_graph_clientsecret
    • vault_graph_driveid

An expired vault_graph_clientsecret or incorrect vault_graph_driveid causes 403 errors.

Check Azure AD App Permissions

  1. In Azure Portal, open App Registrations → your Graph API app
  2. Click API permissions
  3. Confirm Sites.ReadWrite.All is listed with status Granted for your tenant

If status shows "Needs admin consent":

  1. Click Grant admin consent for [your tenant]
  2. Confirm in the dialog

Verify the Drive ID

  1. Use Microsoft Graph Explorer
  2. Authenticate with your Azure AD account
  3. Run: GET /sites/{siteId}/drives
  4. Find the drive for your output document library and copy its id
  5. Update vault_graph_driveid with 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

  1. In Power Apps → Tables, open vault_template and find the relevant template
  2. Check the Template Variant ID field - this must match the exact filename/path used in the Vault template library
  3. 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

  1. Open the blocked CRM record
  2. Click [Sync Workflow Status] in the Command Bar
  3. 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

  1. In Power Apps → Tables, open vault_template
  2. Find the template used to generate the document on this record
  3. Check Workflow Enforcement Mode:
    • Block - CRM operation is prevented until workflow is complete
    • Validate - Warning is shown, but the operation is allowed to proceed
    • None - 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.

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

  1. In Power Apps → Tables, open vault_templaterecipient
  2. Confirm at least one recipient has Recipient Type = Workflow and a valid email address
  3. 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

  1. In Power Apps → Tables, open vault_templateassignment
  2. Find the assignment for the relevant entity
  3. Confirm Context is set to view or both

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.

  1. Verify vault_dispatcher_baseurl is set correctly in Environment Variables
  2. Confirm the Dispatcher Function App is running in Azure Portal
  3. 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.

OperationTypical duration
SharePoint payload upload500ms - 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

  1. In Dynamics 365, navigate to Settings → Administration → System Settings
  2. On the Customization tab, set Enable logging to plug-in trace log to All
  3. Retry the failing action
  4. 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

ErrorCauseResolution
NullReferenceException on vault_graph_driveidEnvironment variable is emptyPopulate vault_graph_driveid
HTTP 401 from DispatcherDispatcher credentials expired or incorrectRotate vault_dispatcher_clientsecret
HTTP 403 from Graph APIGraph App Registration lacks admin consentGrant admin consent for Sites.ReadWrite.All
No vault_templateassignment foundTemplate not assigned to this entityCreate a Template Assignment for the entity
vault_documentlink not foundOpen Document or Sync Status called before Process DocumentRun 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:

  1. Export your template configuration as a Dataverse export or use Power Platform Dataflows
  2. Document your Environment Variable values (except secrets)
  3. 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:

PlanCold startRecommendation
Consumption (default)8 - 10s after idleAcceptable for low-frequency usage
Flex Consumption with minimumInstanceCount: 1EliminatedBest value - small always-on charge, no cold starts
Premium EP1 with min instances = 1EliminatedFor 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.

On this page

Quick DiagnosticsCommand Bar Buttons Not VisibleSymptom: "No Vault buttons appear on Quote, Opportunity, or Account records"Verify the Managed Solution Is InstalledHard Refresh the BrowserVerify Command Bar in App DesignerSecurity Role IssuesSymptom: "Access denied" when clicking a Command Bar buttonAssign the Vault User Security RoleVerify the Role ExistsSign Out and Sign Back InTemplate Gallery Is EmptySymptom: "The Template Gallery shows no templates when [Process Document] is clicked"Confirm Templates ExistCheck Template Is ActiveVerify Template AssignmentCheck Context SettingDocument Generation FailuresSymptom: "An error occurred while calling the Dispatcher" after clicking GenerateVerify Dispatcher Environment VariablesRotate the Dispatcher Client SecretTest Dispatcher ReachabilitySymptom: "SharePoint upload failed with 403 Forbidden"Verify Graph Environment VariablesCheck Azure AD App PermissionsVerify the Drive IDSymptom: "Template not found" error from the DispatcherVerify Template Variant IDVerify SharePoint Template Library AccessWorkflow Enforcement IssuesSymptom: "Operation blocked by REFRACT Platform" when activating a Quote or closing an OpportunitySync the Workflow StatusCheck Enforcement Mode on the TemplateClear a Stale Workflow LinkWorkflow Status IssuesSymptom: "Sync Workflow Status shows 'Workflow not found'"Verify the Workflow Was TriggeredCheck for Workflow ExpirySymptom: "Workflow recipients do not receive invitations"Verify Recipient ConfigurationCheck Dispatcher Workflow LogsBatch Operation IssuesSymptom: "Process Document does nothing when multiple records are selected"Verify Template Assignment ContextCheck Dispatch ModeSymptom: "Batch fails with 'record limit exceeded'"Reduce the SelectionAdjust the Batch Threshold (Optional)Performance and Timeout IssuesSymptom: "Process Document hangs for over 30 seconds before failing"Check for a Missing or Misconfigured Dispatcher URLCheck SharePoint Upload PerformanceSymptom: "User sees a spinner for 10+ seconds on Process Document"Plugin and Solution IssuesSymptom: Plugin errors appear in Dataverse Plugin Trace LogsEnable Plugin Trace LoggingCommon Plugin ErrorsSymptom: Managed solution upgrade fails or causes data lossAlways Use Managed Solution Imports for UpgradesBack Up Configuration Before UpgradingCommon Questions (FAQ)Q: Can REFRACT Platform for Dynamics 365 Sales be used without Business Central?Q: Can I add Vault to custom entities or entities not in the initial list?Q: Why does the first "Process Document" of the day take 20 - 30 seconds, but subsequent ones are much faster?Q: Can I use the same App Registration for both Graph API access and the Dispatcher?Q: How long are generated PDFs stored in SharePoint?Q: What happens if I delete a template that has already been used to generate documents?Q: Can multiple CRM users generate documents from the same record simultaneously?Q: How do I migrate template configuration between environments (dev to production)?Q: How do admins access the Vault template configuration tables?