Template Configuration - VaultPDF Business Central
Configure VaultPDF templates for PDF generation, batch dispatch, e-signature, approval workflows, distribution, and multi-hop field traversal in Business Central.
Template Configuration
Templates are the bridge between Business Central data and PDF output. A template defines which fields map to which PDF regions, how data is formatted, and how the resulting document is routed (e.g., for approval or signature).
Create the customer's first template
Navigate to VaultPDF Templates in Business Central.
Click New to open the Template Card. The card has two parts: the data source configuration (header) and the Variants subform (settings and routing).
Template Header (data source):
- Template Code - Unique identifier, e.g.
SALES-ORDER - Page ID - The Business Central page where this template appears in the gallery
- Source Table / Lines Table - Business Central tables providing header and line data
- Field Mapping Lines - Maps BC fields to the template JSON schema
Variants subform (settings per delivery style):
Every template automatically gets a default variant whose Variant ID matches the Template Code (e.g. SALES-ORDER). The default variant holds all generation settings: dispatch mode, watermark, e-signature, workflow, distribution, branding, and auto-generate.
Create additional variants when the same data source needs to produce PDFs with different configurations - for example, a SALES-ORDER-DRAFT variant with a DRAFT watermark alongside a clean SALES-ORDER final variant.
To configure a variant's settings, select its row in the Variants subform and click Edit Variant Settings.
Variant Settings
Variant Settings control how the generated PDF is handled after creation. Each variant has independent settings. Access them from the Variants subform on the Template Card by clicking Edit Variant Settings, or open VaultPDF Template Setup from Tell Me to manage all variants directly.
Default: Template
| Value | Purpose |
|---|---|
Template | Standard PDF generation with no workflow routing. Use for customer invoices, remittance advice, and informational documents |
Workflow | Triggers a REFRACT Platform approval or e-signature workflow after PDF generation. Displays additional Workflow configuration options |
Change this setting to Workflow only if you need the generated PDF to pass through an approval or e-sign gateway before delivery.
Default: Standard
Dispatch Mode controls whether one PDF is generated or multiple PDFs are created from a batch of records.
| Mode | Behavior | Use Case |
|---|---|---|
Standard | One PDF for the current record | Individual invoice, order, or report |
Per Group | One PDF per distinct value of Group By Field (e.g., one remittance per vendor) | Remittance runs, payment grouping by payee |
Per Record | One PDF per source record in the filtered set | Batch invoicing, individual customer statements |
Single Array | All records combined into one PDF | Combined quarterly reports, consolidated statements |
Grouped Array | Records grouped into arrays within one PDF with repeating headers | Multi-vendor purchase order summaries |
Group By Field Required
If you select Dispatch Mode = Per Group, you must set the Group By Field ID field, or the Dispatcher fails at runtime with an error. This field specifies which Business Central field determines the grouping boundary.
Enable the eSign Enabled toggle to route the generated PDF to signers after creation.
| Field | Description |
|---|---|
| eSign Mode | Sequential - signers sign one after another in slot order. Parallel - all signers receive simultaneously and can sign in any order |
| eSign Expiry (minutes) | Duration the signing link remains valid. 0 uses the Dispatcher default (10,080 minutes = 7 days) |
Signers table:
- Slot Index - Signing order (1, 2, 3...). Used in Sequential mode to enforce order
- Role - e.g.
Signer,Witness,Approver(informational only in the signing portal) - Email - Signer's email address. Supports field token substitution
- Name Prefill - Auto-populates the signer's name in the signing portal
Visible only when Template Type = Workflow.
Enable the Workflow Enabled toggle to activate REFRACT Platform workflow routing.
| Field | Description |
|---|---|
| Workflow Enforcement Mode | None - informational only. Validate - warn if conditions unmet. Block - prevent processing if conditions unmet |
| Workflow Message | Message sent to workflow recipients. Supports field token substitution |
Workflow Recipients table:
- Email - Recipient's email address
- Display Name - Name shown in the workflow notification
Default message (auto-filled):
You have been invited to review and approve a document.
Document Reference: [No.] field.
Please complete the required action.
Do not forward or share this invitation.Configure how the generated PDF is delivered to recipients.
Watermark:
- Override Watermark - Print a watermark on all PDFs from this template
- Watermark Text - The text to display, e.g.
CONFIDENTIAL,DRAFT,APPROVED
Distribution:
- Distribution Enabled - Activate document delivery
- Distribution Approver Email - Approver email (supports field token substitution)
Delivery Recipients table:
- Email - Recipient email address
- Display Name - Name shown in delivery notifications
Token Substitution
Field tokens are resolved at dispatch time from the source Business Central record. Use the exact Business Central field name, e.g. No., Sell-to Customer Name, or custom fields like approverEmail.
Unresolvable tokens are left as literal text in the output.
Batch dispatch is triggered the same way - through the Template Gallery - but the selected template must have a non-Standard Dispatch Mode. VaultPDF will iterate over the record set according to the mode:
- Per Group - groups records by the configured field, one PDF per unique value
- Per Record - one PDF per record in the filtered set
- Single Array / Grouped Array - combines records into a single PDF payload
Execution Options
When the record count meets or exceeds the batch async threshold (default: 500, configurable via VAULTPDF_BATCH_ASYNC_THRESHOLD), VaultPDF presents a choice dialog instead of running immediately:
"This batch contains X records. How would you like to run it?"
| Option | Behaviour |
|---|---|
| Run now in background | Queues an immediate Job Queue entry - you can navigate away and continue working while it runs |
| Schedule for later | Opens a date/time picker - the job is created and held until your chosen start time |
| Generate now (may take a while) | Runs synchronously in the current browser session - use for smaller sets or when you need to confirm the outcome before closing the page |
Pressing Cancel on either the option dialog or the scheduling picker dismisses the progress overlay cleanly with no side effects.
Background Job Lifecycle
When Run now in background or Schedule for later is chosen, VaultPDF:
- Creates a VaultPDF Batch Job Entry with status
Queued, capturing the template, doc number, and calling context. - Enqueues a Job Queue Entry targeting
VaultPDF Batch Job Runner, with Earliest Start Date/Time set when scheduling for later. - Displays a confirmation with the assigned entry number and - for scheduled runs - the start time.
The Job Queue runner transitions the entry through these statuses:
| Status | Meaning |
|---|---|
Queued | Entry created; waiting for a free Job Queue worker |
Running | The batch dispatcher is actively processing records |
Completed | All records processed; Blob Path and Correlation ID are stored on the entry |
Partial | Some records processed; one or more per-record errors were logged - check the Record Details tab on the Batch Jobs page |
Failed | An unhandled error stopped the run; Status Message contains the error detail |
When the job finishes, Business Central sends a completion notification. You can also open VaultPDF Batch Jobs from the Tell Me bar at any time to monitor progress or review past runs.
Recurring Schedules
For unattended, time-based execution - nightly remittance runs, weekly statements, end-of-month consolidations - use the Schedule Batch action on the Template Card rather than the gallery prompt. See Scheduled and Recurring Batch Jobs below.
Batch operations for Single Array and Grouped Array modes are recorded automatically in the VaultPDF Batch Log Entries page (System Settings → View Batch Log). See Batch Render Log below.
Resetting Template Configuration
The Clear Settings action on the Variant Settings page resets all fields to defaults and deletes all signers, recipients, and workflow recipients. Use this to start a variant's routing configuration from scratch without deleting the template or the variant itself.
Branding (Logo)
The Branding section in Variant Settings controls how the logo is injected into the generated PDF. VaultPDF sends the logo as a base64-encoded string in the branding.logoBase64 field of the dispatch payload - the PDF template uses this field to render the logo at its configured position.
Logo injection is opt-in per template. The default is None - no logo is included unless you configure it.
Logo Source options
| Source | Description |
|---|---|
| None | No logo is sent. Default. |
| Company Information | Reads the Picture field from the BC Company Information record. One logo for all documents in the company. Ideal for single-brand environments. |
| Template Line | Resolves the logo from any mapped template line, including fields on linked tables reached via hop chains. Use this for location-based logos, entity-linked logos, or any scenario where the logo differs per record. The logo line is automatically excluded from the body payload so the base64 string does not appear twice. |
Logo Template Line field
When Logo Source = Template Line, the Logo Template Line field appears. Click the ... assist button to pick from the template lines configured for this template. The selected line's full hop chain is resolved at generation time - so it can reach any table the hop chain can navigate to, including the source table itself with no hops.
Example: Company logo on all sales templates
Open the Template Card for each sales template (e.g. SALES-ORDER), select the default variant in the Variants subform, click Edit Variant Settings, and in the Branding section set:
- Logo Source →
Company Information
VaultPDF reads Company Information.Picture, converts it to base64, and includes it as branding.logoBase64 in every generated document for that template.
No additional template line mapping is needed.
Resulting payload:
{
"branding": {
"logoBase64": "iVBORw0KGgoAAAANSUhEUgAA..."
}
}Example: Location-based logos
Scenario: Your customer operates three warehouse locations - UK, DE, and US - each with its own brand logo. Sales Orders should use the logo of the fulfillment location rather than the company-wide logo.
How it works: extend the BC Location table with a base64 logo field, populate it per location, then point VaultPDF at that field via a template line hop.
Extend the Location table (one-time AL extension by your BC partner):
tableextension 50100 "Location Logo Ext" extends Location
{
fields
{
field(50100; "Logo (Base64)"; Text[2048])
{
Caption = 'Logo (Base64)';
DataClassification = CustomerContent;
}
}
}This adds a plain text field to each Location record to store the base64-encoded logo string.
Populate logos per location in Business Central:
Open each Location Card (search Locations in Tell Me), open the record, and paste the base64 string into Logo (Base64). You can generate a base64 string from any image using an online converter or your image toolchain.
Add a template line for the location logo on each affected template (e.g. SALES-ORDER):
From the Template Card, click Add Fields (or New Line) and configure:
| Setting | Value |
|---|---|
| Table ID | 14 (Location) |
| Field | Logo (Base64) (field you added) |
| Section | Header |
| JSON Group | (any - this field is only used for the logo, not rendered in the payload body) |
Then click Configure Hops on this line and add one hop:
| Hop | Table | Link Field on Source |
|---|---|---|
| 1 | 14 (Location) | 28 (Location Code on Sales Header) |
This tells VaultPDF: from Sales Header, follow the Location Code field to the Location table.
Set the Logo Source in Variant Settings:
Open the Template Card for SALES-ORDER, select the default variant in the Variants subform, click Edit Variant Settings, and in the Branding section set:
- Logo Source →
Template Line - Logo Template Line → click
...and pick the Location logo line you just created
Save. From this point on, every Sales Order PDF uses the logo of the order's location.
Resulting payload (Sales Order for location DE):
{
"branding": {
"logoBase64": "iVBORw0KGgoAAAANSUhEUgAA..."
}
}The value is the base64 string stored on the DE Location record.
Fallback when location is blank
If the Sales Order has no Location Code, the hop resolves to no record and branding.logoBase64 is omitted from the payload. The PDF template should define a fallback logo for this case, or you can ensure all orders have a Location Code.
Example: Logo stored on a linked entity (Template Line, multi-hop)
You can chain multiple hops to reach any linked table. For example, to use the Responsibility Center logo linked via Salesperson → Responsibility Center:
- Add a
Logo (Base64)field to theResponsibility Centertable (table 5714) via extension - Add a template line with two hops:
- Hop 1:
Sales Header.Salesperson Code→Salesperson/Purchaser(table 13) - Hop 2:
Salesperson/Purchaser.Resp. Center Code→Responsibility Center(table 5714)
- Hop 1:
- Set Logo Source = Template Line → pick this line
The same TemplateLine mechanism resolves the full chain and reads the logo from the final record.
Field type requirement
Template Line logo source reads Text and Code fields only - the field must contain a pre-encoded base64 string. For the Company Information Picture field (Blob type), use Logo Source = Company Information instead; that mode handles Blob extraction natively.
Media-type fields (such as Salesperson/Purchaser.Image) cannot be streamed via this mechanism. If you need a Media field as the logo source, store a base64 copy in a companion Text field on the same record.
Template Setup (Variants)
Each template has one or more variants managed in the Variants subform on the Template Card. A variant connects the template's data source to a specific renderer file in SharePoint and holds all generation settings (dispatch mode, watermark, e-signature, branding, etc.).
The default variant is created automatically with the same Variant ID as the Template Code. To view or manage all variants across all templates, search for VaultPDF Template Setup in the Tell Me bar.
Variant identity and renderer fields (configured via Edit Variant Settings):
| Field | Description |
|---|---|
| Template Variant ID | Unique identifier for this variant (e.g. SALES-ORDER, SALES-ORDER-DRAFT). Must match the .vpdf renderer filename in SharePoint (without extension) |
| Template Code | The parent template this variant belongs to |
| Template Name | Friendly display name shown in the Template Gallery tile |
| Template ID | Renderer file name on the Dispatcher (e.g. sales-order-standard). Used to build the templatePath sent to the Dispatcher |
| Source System | Root folder in the templates SharePoint drive (should match VAULTPDF_SOURCE_SYSTEM) |
| Source Module | Sub-folder within the source system (e.g. Sales, PurchaseOrders) |
| Source Doc. Type | Document type string sent in the dispatcher payload options.docType field |
| Enabled | When disabled, the variant is hidden from the Template Gallery |
Populated Automatically on Import
When you use Import Templates from the Template Gallery, VaultPDF creates or updates variant records automatically from the .vpdf file names and folder structure. Manual entry is only needed when creating templates from scratch without using the import flow.
Adding a second variant:
In the Variants subform on the Template Card, click Duplicate Variant to copy the selected variant. The duplicate inherits all settings - change only what differs (e.g. Variant ID, watermark text, dispatch mode). The duplicate starts as Enabled = false until you verify the settings and enable it.
Additional Pages (Multi-Page Templates)
The Additional Pages subform on the Template Card (Configuration group) lets you register extra Business Central pages where the same template should appear in the gallery. This is useful when the same document type is processed from multiple pages - for example, a remittance template that should be available from both the Payment Journal page and the Vendor Card.
Navigate to VaultPDF Templates → open a template → Additional Pages subform to configure page mappings.
| Field | Description |
|---|---|
| Page ID | An additional Business Central page where this template should appear. Use the lookup to select from all pages |
| Page Name | Auto-filled display name for the selected page (read-only) |
How it works: When a user opens the Template Gallery from any page listed in Additional Pages, VaultPDF includes this template in the gallery - alongside templates whose primary Page ID matches directly. Deduplication is automatic: if a template matches both the primary Page ID and an Additional Pages entry for the same page, it appears only once.
Example: A PURCH-REMITTANCE template has Page ID = 54 (Purchase Order). Adding page 51 (Purchase Invoice) to Additional Pages makes PURCH-REMITTANCE also appear in the gallery when opened from a Purchase Invoice card.
Additional Pages entries are template-scoped - each template controls its own extra pages independently. Adding a page here does not create new action buttons; users access the gallery through the standard Process Document button that already exists on that page.
Multi-hop Field Traversal
Standard template field mapping reads fields directly from the source table (e.g. Sales Header) or its line table. Hop chains extend this to traverse foreign-key relationships - reaching tables that are not directly linked to the source document. For one-to-many relationships between a line record and another table, use Per-Line Array Nesting instead.
Example: A Purchase Order template that needs the vendor's bank account IBAN requires two hops: Purchase Header → Vendor (Buy-from Vendor No.) → Vendor Bank Account.
Configure hops on a template line via the Hops subpage (visible when the line has Via Table ID set):
| Field | Description |
|---|---|
| Hop Sequence | Order of traversal (auto-incremented). Hop 1 links from the source table; Hop 2 links from Hop 1's table; and so on |
| Table ID | The table reached at this hop |
| Link Field ID | The field on the previous table whose value is the primary key of this table. For Hop 1 this is a field on the source table; for Hop 2+ it is a field on the preceding hop's table |
For deeply joined or conditional datasets (e.g. all bank accounts for a vendor, all open invoices for a customer), consider OnResolveQuerySection in a developer extension instead. Hop chains work well for single-record traversals but become impractical when one-to-many relationships are involved.
Per-Line Array Nesting
Use Link Target Field ID to nest a related table's records as a JSON array inside each line item. This is the right pattern when a one-to-many relationship exists between a line record and another table - for example, one Sales Line can have multiple Sales Comment Lines.
How it works:
Set these fields on a Line-section template line:
| Field | Description |
|---|---|
| Table ID | The related table (e.g. Sales Comment Line) |
| Field ID | The field on the related table to include in the output |
| Section | Line |
| JSON Group | Array key in the JSON output (e.g. lineComments) |
| Link Field ID | Field on the Lines table whose value identifies the parent line (e.g. Line No. on Sales Line) |
| Link Target Field ID | Field on the related table that must match the Link Field ID value (e.g. Document Line No. on Sales Comment Line) |
At generation time, for each Sales Line VaultPDF filters Sales Comment Line where Document Line No. = Sales Line."Line No.", collects all matching records, and emits them as an array under lineComments.
Document-level arrays - when you want all records from a related table as a single array at the document level rather than nested per line, set Link Field ID = 0 and set a JSON Group. VaultPDF collects all records for the document (filtered from the header via its primary key) into one array item in lines[].
Example: Sales Comment Lines on a Sales Order
The default Sales templates include this pattern out of the box, producing:
{
"lines": [
{ "headerComments": [
{ "Date": "2026-01-15", "Comment": "Please deliver before noon." }
]
},
{
"No.": "ITEM-001",
"Description": "Widget",
"lineComments": [
{ "Date": "2026-01-15", "Comment": "Handle with care." }
]
}
]
}headerComments is a document-level array (Link Field ID = 0, JSON Group = headerComments) - all header-level comments for the order in one array. lineComments is per-line (Link Field ID = Sales Line Line No., Link Target Field ID = Sales Comment Line Document Line No., JSON Group = lineComments) - each Sales Line gets only its own comments.
Link Target Field Name
After setting Link Target Field ID, the Link Target Field Name column is auto-filled from the field metadata. It is read-only and for display only - no manual entry required.
Batch Filter Lines
Batch Filter Lines let you define per-template record filters that are applied automatically every time the template runs in batch mode. This replaces the need for users to manually filter the source record list before triggering a batch.
Access them via VaultPDF Templates → select a template → Batch Filters action (or the Batch Filters subpage on the Template Card).
| Field | Description |
|---|---|
| Filter Field ID | Field on the source table to filter on (lookup shows all fields for the template's source table) |
| Filter Source | Context - value comes from the caller context (e.g. the journal batch name). Fixed Value - use the literal value below. Current Date - use today's date. Date Formula - evaluate a Business Central date formula entered in Fixed Value (e.g. CY = current year, -1M = last month) relative to today |
| Context Key | Key name in the caller context JSON. Used when Filter Source = Context |
| Fixed Value | Literal filter value. For option/enum fields use the caption, e.g. Open or Released. For Date Formula filters, enter the BC date formula here, e.g. -1M for last month or CY for the current year |
Examples:
- Fixed status filter: A remittance advice template that should only process Open Payment Journal lines -
Filter Field ID = Status,Filter Source = Fixed Value,Fixed Value = Open - Current-month date filter: A nightly batch that should only process records posted this month -
Filter Field ID = Posting Date,Filter Source = Date Formula,Fixed Value = CM(CM = current month in BC date formula notation) - Prior-month date filter: A month-end run that processes only last month's records -
Filter Field ID = Posting Date,Filter Source = Date Formula,Fixed Value = -1M..CM-1D(previous month start to last day of previous month)
Batch filters are applied in addition to any filters already on the record set when the user triggers the batch. They cannot be removed at runtime - design them to narrow, not replace, the user's selection.
Previewing Batch Configuration
Before committing to a full production batch run, use the Preview Batch action on the Template Card to verify that your Batch Filter Lines are selecting the right records and that your field mappings produce the expected output.
Action location: Template Card → action bar → Preview Batch (enabled only when the template has at least one variant with Dispatch Mode ≠ Standard)
How it works:
- Click Preview Batch on an open Template Card
- VaultPDF counts the records matching your current Batch Filter Lines and reports the count in a confirmation prompt
- Confirm to download
<TemplateCode>_preview.json- a sample JSON payload for the first matching group or record - Open the file to inspect the actual field values that would be dispatched
No documents are uploaded to SharePoint and no requests are sent to the Dispatcher. The preview runs the same filter logic and field-mapping pipeline as a real batch, so the JSON output is exactly what would be sent.
What to check in the preview file:
- Field values are populated (not blank or null) - blank values often indicate a misconfigured field mapping or missing data
- The
headerandlinessections contain the expected record structure - Date fields are in the expected ISO format
- For Per Group mode, the group key value (e.g., vendor number) is correct
If Preview Batch reports 0 records, your Batch Filter Lines are too restrictive or the source table contains no matching rows. Adjust the filters and preview again before scheduling the batch.
Automation: Auto-Generate on Post
The Auto Generate on Post toggle (in the Dispatch section of Variant Settings) instructs VaultPDF to automatically queue a PDF generation request whenever a Business Central document from this template's source table is posted.
| Field | Description |
|---|---|
| Auto Generate on Post | When enabled on a variant, a VaultPDF Gen Request row is created automatically each time a document from the template's source table is posted. VaultPDF queues one request per enabled variant with this flag set. The VaultPDF Gen Processor job then processes the requests in the background. |
Requirements:
- Variant must have Dispatch Mode = Standard - batch modes are not supported for posting automation
- Variant must be Enabled
- A recurring Job Queue Entry for codeunit
77136(VaultPDF Gen Processor) must be running
The posting subscriber fires after the posting transaction commits (OnAfterFinalizePosting), so a generation failure never rolls back a completed posting.
Multiple Templates per Document Table
If two or more templates share the same Source Table ID and both have Auto Generate on Post enabled, a separate generation request is queued for each template on every posting. This is intentional - for example, you may want to generate both a customer-facing invoice PDF and an internal cost-summary PDF from the same posted Sales Invoice.
For full setup instructions, API integration patterns, and queue monitoring, see the Automated Document Generation guide.
Workflow Enforcement
When Template Type = Workflow and Workflow Enforcement Mode is set to Validate or Block, VaultPDF enforces document generation requirements at key BC operation points. Enforcement is wired into:
| Operation | Enforcement fires when... |
|---|---|
| Posting a Sales document | Sales Order, Invoice, or Credit Memo is posted |
| Posting a Purchase document | Purchase Order, Invoice, or Credit Memo is posted |
| Posting a Service Order | Service order posting begins (service invoice/credit memo creation) |
| Shipping a Transfer Order | Transfer shipment is posted (goods leave source location) |
| Unblocking a Vendor | Vendor Blocked status changes from any blocked value to unblocked |
| Unblocking a Customer | Customer Blocked status changes to unblocked |
| Unblocking an Item | Item Blocked flag changes from true to false |
In Validate mode the user sees a warning dialog and can choose to proceed or cancel. In Block mode the operation throws an error and is prevented until the workflow reaches complete status.
Background sessions (Job Queue): enforcement always behaves as Block in headless context - there is no UI to show a warning dialog, so any pending or rejected workflow causes an error that stops the job.
To add enforcement for additional document types (Assembly Orders, Transfer Receipt, custom posting codeunits), or to bypass enforcement for specific records, see Workflow Enforcement in the Developer Guide.
Processing Documents
Once templates and settings are configured, end users and batch processes generate documents using the VaultPDF actions on standard Business Central pages.
Manual Document Processing
Open any supported Business Central document (Sales Order, Purchase Invoice, Sales Invoice, etc.)
In the action bar, locate the VaultPDF action group and click Process Document
The Template Gallery modal opens. Select the template you want to use and click Generate
VaultPDF exports the Business Central record as JSON, uploads it to SharePoint, calls the Dispatcher, and returns a success notification or error message
Click Open Document in the VaultPDF action group to download and open the generated PDF in your browser
For documents in an active workflow, use the Sync Workflow Status action to refresh the workflow state from the REFRACT Platform engine. This action requires the VPDF-REVIEWER permission set or higher.
Batch Document Operations
Batch processing is triggered the same way as manual processing, but the selected variant must have a non-Standard Dispatch Mode.
VaultPDF iterates over the record set according to the mode:
- Per Group - Groups records by the configured field and generates one PDF per unique group value
- Per Record - Generates one PDF per record in the filtered set
- Single Array/Grouped Array - Combines all records into a single PDF payload
When the record count meets or exceeds the batch async threshold (default: 500), VaultPDF presents a choice: run immediately in the background, schedule for a specific date and time, or generate synchronously in the current session. See the Batch Operations tab in Template Configuration above for full details on execution options, job statuses, and monitoring. For recurring unattended runs (nightly, weekly, etc.) see Scheduled and Recurring Batch Jobs below.
Batch Delivery Tracking
Batch operations show a single success notification regardless of individual operation outcomes. To review the detailed status of each generated document (success, failure, retry history), open System Settings and click View Upload Log.
Batch Render Log
The VaultPDF Batch Log Entries page records every successful batch PDF render for Single Array and Grouped Array dispatch modes. It gives finance and ops teams a permanent, searchable audit trail of what was generated, when, and by whom - without needing to open the Job Queue or Batch Jobs pages.
Access it via VaultPDF System Settings → View Batch Log, or search for VaultPDF Batch Log Entries in Tell Me.
What gets logged
A new entry is inserted automatically each time a batch render completes successfully. Only Single Array and Grouped Array dispatch modes write to this log - these are the modes that combine multiple records into a single array payload and dispatch it as one batch render request to the REFRACT Platform engine.
Per Group and Per Record modes are not logged here. Each render in those modes is a discrete, single-document request and is already traceable through standard Record Links on the source document.
| Field | Description |
|---|---|
| Log Date/Time | When the batch render completed |
| Template Code | The VaultPDF template code used (e.g. PAYMNT_ADV) |
| Journal Template Name | The BC journal template name from the batch context (e.g. PAYMENT, CASHRCPT). Blank for non-journal batch types such as Customer Statements. |
| Batch Name | The journal batch name or document identifier passed when the batch was triggered (e.g. DEFAULT, MARCH) |
| User ID | For synchronous runs: the BC user who clicked Generate. For background (Job Queue) runs: the user who originally submitted the job - not the Job Queue service account. |
| Vault Lifecycle Workspace | Clickable link that opens the REFRACT Platform Lifecycle portal filtered to this batch. Only shown when VAULTPDF_PORTAL_URL is configured and the dispatcher returned a Batch ID. |
Additional fields - Correlation ID, Batch ID, Blob Path, and Dispatch Mode - are stored in the underlying table (VaultPDF Batch Log Entry) for use by extensions or custom reports. They are intentionally hidden from the default page view to keep the list focused.
Vault Lifecycle Workspace link
When the VAULTPDF_PORTAL_URL system setting is populated, each log entry shows a Vault Lifecycle Workspace link. Clicking it opens:
{VAULTPDF_PORTAL_URL}?batchId={Batch ID}This navigates directly to the batch's document set in the REFRACT Platform portal - useful for reviewing render status, downloading PDFs, or checking workflow state for the entire batch in one view.
The link is computed at display time from the stored Batch ID and the current VAULTPDF_PORTAL_URL setting. If the portal URL is not configured, the column is blank for that row.
Synchronous vs. background logging
The log entry is inserted in both execution paths:
| Execution path | When the entry is written |
|---|---|
| Synchronous (inline) | Immediately after the batch render succeeds, while the Template Gallery is still open |
| Background (Job Queue) | After the Job Queue runner marks the Batch Job Entry as Completed |
In both cases, User ID reflects the person who triggered the batch, not any background service account.
Scheduled and Recurring Batch Jobs
The execution options in the Template Gallery are document-context driven - they capture the page and record the user was viewing and apply any active list filters. For fully unattended, time-based batch runs (nightly remittance advice, weekly customer statements, end-of-month consolidations) use the Schedule Batch action on the Template Card instead.
Setting Up a Schedule
Navigate to VaultPDF Templates in Business Central and open the template you want to schedule.
The Schedule Batch action is only enabled for templates that have at least one variant with a non-Standard Dispatch Mode. Standard-mode variants generate one document per record on demand and do not support batch scheduling.
Click Schedule Batch in the action bar to open the scheduling dialog.
| Field | Description |
|---|---|
| Date | Date of the first (or only) run |
| Time | Time of the first run - defaults to 08:00 |
| Recurring | Enable for repeating execution on a fixed interval |
| Frequency | Visible when Recurring is enabled. Choose Daily (1,440 min), Weekly (10,080 min), Monthly (43,200 min), or Custom to enter a specific interval |
| Interval (minutes) | Visible only when Frequency = Custom. Enter the exact number of minutes between runs |
| Max Retry Attempts | How many times the Job Queue will retry this batch if it fails. Defaults to the VAULTPDF_GEN_QUEUE_MAX_RETRIES system setting (default: 3). Increase for environments with transient connectivity issues; decrease for faster failure surfacing |
Click OK to create (or update) the Job Queue entry.
Confirm the outcome:
- One-time run - a VaultPDF Batch Job Entry is created immediately with status
Queued. The job is held until the chosen start time, then executes once. - Recurring run - a single Job Queue Entry is registered with
Recurring Job = true. A new VaultPDF Batch Job Entry is created automatically at the start of each execution, giving you a full independent record for every run.
Rescheduling: if a recurring schedule already exists for this template, clicking Schedule Batch again and confirming replaces it - the old entry is deleted and a new one is created with the updated time and interval. You will never end up with two concurrent recurring jobs for the same template.
Cannot reschedule while a run is in progress
If the existing Job Queue entry is currently executing (status In Process), the replace is blocked with an error. Wait for the current run to complete before rescheduling.
How Recurring Runs Differ from Ad-hoc Gallery Runs
| Aspect | Ad-hoc (Template Gallery) | Recurring (Template Card) |
|---|---|---|
| Triggered by | User click in the Template Gallery | BC Job Queue on a schedule |
| Caller context | Captures page, doc number, and the user's active list filters | No user session - no caller context |
| Record selection | Batch Filter Lines applied on top of the user's active filters | Batch Filter Lines only - no additional runtime filters |
| Batch Job Entry | One entry created up front before the run starts | One new entry created at the start of each scheduled execution |
| History | Single entry per manual submission | One entry per scheduled execution - full run history |
Batch Filter Lines Are Required for Recurring Jobs
A recurring scheduled job has no caller context and cannot inherit any list filters the user may have had active. Without Batch Filter Lines configured on the template, the job will attempt to process every record in the source table on every execution.
Always configure Batch Filter Lines - for example, Status = Open or Posting Date = Current Date - before enabling a recurring schedule. See Batch Filter Lines above for configuration details.
Job Statuses
Every execution - whether one-time or recurring - creates a VaultPDF Batch Job Entry that passes through the same status lifecycle:
| Status | Meaning |
|---|---|
Queued | Entry created; waiting for a free Job Queue worker |
Running | The batch dispatcher is actively processing records |
Completed | All records processed successfully |
Partial | Some records succeeded; per-record errors were logged - check the Record Details tab |
Failed | An unhandled error stopped the run; Status Message contains the error detail |
Retrying Failed Records
When a batch job completes with Partial status - some records succeeded and others failed - use the Retry Failed Records action on the VaultPDF Batch Jobs page to re-process only the failed detail lines without re-running the entire batch.
How to retry:
- Open VaultPDF Batch Jobs from the Tell Me bar and locate the job with
Partialstatus - Open the job entry and review the Record Details sub-list to see which records failed and what error each produced
- Resolve any data issues indicated by the error messages (e.g., missing field values, connectivity problems)
- Click Retry Failed Records in the action bar (the action is only enabled when Status = Partial)
- Confirm the prompt - VaultPDF reprocesses only the detail lines marked
Error, leaving successful lines untouched
After retry completes:
- Successfully reprocessed detail lines move to
Completed - If all errors are resolved, the parent job status becomes
Completed - Any remaining errors keep the job at
Partial- retry as many times as needed
Supported Dispatch Modes
Retry Failed Records is available for Per Record and Per Group dispatch modes only. These modes process each record or group as an independent unit, so individual failures can be isolated and retried.
Single Array and Grouped Array modes combine all records into a single indivisible payload. If these fail, re-run the entire batch from the Template Gallery.
Monitoring and Managing the Schedule
Viewing run history:
Open VaultPDF Batch Jobs from the Tell Me bar and filter by Template Code. Each execution appears as its own row with independent status, timestamps, and (for Per Group / Per Record modes) a Record Details sub-list showing any per-record errors.
Rescheduling or changing the interval:
Use the Schedule Batch action on the Template Card again. If a recurring entry already exists for the template it is automatically replaced - no manual cleanup needed. The only restriction is that you cannot reschedule while the current run is In Process; wait for it to finish first.
Pausing without deleting:
- Search for Job Queue Entries in Business Central
- Filter by codeunit 77132 (VaultPDF Batch Job Runner) and Parameter String equal to the template code
- Open the entry and set status to On Hold - the schedule is suspended until you set it back to Ready
Deleting a recurring schedule:
Delete the Job Queue Entry. Any VaultPDF Batch Job Entries already in progress are unaffected and complete normally. Historical entries remain and are not deleted.
Completion Notifications
Recurring jobs run as background service sessions with no logged-in user. Business Central completion notifications are session-scoped, so they are not delivered to a user's browser for scheduled runs. Use the VaultPDF Batch Jobs page to check run outcomes, or configure a webhook URL in System Settings to receive an HTTP POST when a job finishes. See Webhook Completion Notifications below.
Webhook Completion Notifications
VaultPDF can POST a JSON notification to any HTTP endpoint when an async batch job finishes. Use this to integrate with Slack, Microsoft Teams, monitoring systems, or custom dashboards without requiring a logged-in user.
Configuration
Navigate to VaultPDF System Settings and configure:
| Key | Default | Description |
|---|---|---|
VAULTPDF_BATCH_NOTIFY_WEBHOOK_URL | (blank) | URL to POST the completion JSON to. Leave blank to disable webhook notifications entirely |
VAULTPDF_BATCH_NOTIFY_ON | FailureOnly | Always - fire on every completed job regardless of status. FailureOnly - fire only on Partial and Failed jobs (default) |
Both keys are created automatically by Initialize Default Keys.
Notification Payload
{
"templateCode": "PAYMNT-ADV",
"entryNo": 42,
"status": "Partial",
"statusMessage": "2 of 15 records failed. See VaultPDF Batch Jobs entry 42 for details.",
"completedAt": "2026-06-21T08:00:00Z",
"message": "VaultPDF Batch Job 42 (PAYMNT-ADV) completed with status: Partial."
}| Field | Description |
|---|---|
templateCode | Template code of the completed batch job |
entryNo | VaultPDF Batch Job Entry number - use this to look up the full job record in BC |
status | Final job status: Completed, Partial, or Failed |
statusMessage | Human-readable result summary including record counts where applicable |
completedAt | ISO 8601 UTC timestamp when the job runner wrote the final status |
message | Short notification message suitable for display in a chat notification |
Behavior Notes
- The webhook fires after the job runner writes the final status - all record processing is already complete at this point
- HTTP errors from the webhook endpoint are silently ignored - a webhook failure never causes a batch job to fail or be retried
- No retry on webhook delivery failure; if the endpoint is temporarily unavailable, that notification is lost
- For Teams or Slack incoming webhooks, point
VAULTPDF_BATCH_NOTIFY_WEBHOOK_URLdirectly to the incoming webhook URL and setVAULTPDF_BATCH_NOTIFY_ON = Alwaysto receive a notification for every run
AL Integration Event
Partners can subscribe to OnAfterSendCompletionNotification on codeunit 77132 (VaultPDF Batch Job Runner) to handle job completion in AL code without relying on HTTP:
[EventSubscriber(ObjectType::Codeunit, Codeunit::"VaultPDF Batch Job Runner",
'OnAfterSendCompletionNotification', '', false, false)]
local procedure OnBatchJobComplete(BatchJobEntry: Record "VaultPDF Batch Job Entry")
begin
if BatchJobEntry.Status = BatchJobEntry.Status::Failed then
MyAlertMgt.SendUrgentAlert(
BatchJobEntry."Template Code",
BatchJobEntry."Status Message");
end;This event fires after the HTTP webhook is attempted (or skipped). It receives the fully-populated VaultPDF Batch Job Entry record - Status, Template Code, Entry No., Status Message, and all timing fields are available.
Next Steps
- Automated Document Generation - Auto-generate on post, external API triggers, and queue monitoring
- Pre-built Templates & VaultPacks - Browse professionally-designed templates ready to import
- Developer Guide - Extend VaultPDF with custom AL code, events, and enums (advanced)
- Event Reference - Complete integration event and payload reference
- Troubleshooting Guide - Common issues and solutions
REFRACT Platform for Dynamics 365 Business Central
Complete integration guide for Business Central consultants and developers. Install, configure, and extend VaultPDF with on-demand PDF generation, SharePoint storage, e-signature workflows, and audit trails.
Automated Document Generation - VaultPDF Business Central
Trigger VaultPDF document generation automatically on posting, from external systems via API, or programmatically from AL code. Covers the Generation Queue, job setup, and monitoring.