Skip to main content

File Viewer

The File Viewer lets users preview document attachments directly inside Business Central, on the standard attachment FactBoxes of document pages. It uploads the attachment to SharePoint/OneDrive through Microsoft Graph and shows the returned preview inline, so users can read a file without downloading it.

Purpose and business value

Processing incoming documents usually means checking the attached file (for example the original invoice PDF) while working on the Business Central record. The File Viewer removes the download-open-switch-back cycle by showing the file next to the record, which speeds up review and reduces errors.

Usage

  • Open a Business Central document that has an attachment FactBox (for example a purchase invoice created from a Core document).
  • Select the attachment; its preview is shown inline in the FactBox.
  • Use Undock Viewer to detach the preview into its own window — useful on wide or multi-monitor setups.
  • Use Dock Viewer to return the preview to the FactBox.

{add screenshot of Document Attachment FactBox with File Viewer here}

How it works

When you preview an attachment, the file is uploaded to SharePoint/OneDrive via Microsoft Graph, and Graph returns a preview URL that Business Central renders inside the viewer control.

Setup

The File Viewer is enabled and configured from the File Viewer (SharePoint Preview) group on the Core Setup card. The recommended way to configure it is the File Viewer Setup Wizard, which walks you through the credentials, the connection test, and the SharePoint site.

Prerequisites

  • A Microsoft Entra ID app registration providing a Tenant ID, Client ID, and Client Secret.
  • A SharePoint site to hold the uploaded files.
  • Appropriate Microsoft Graph permissions granted to the app registration.

Error handling

When you enable the File Viewer, Core validates the prerequisites. If a required setting is missing (for example the credentials or the SharePoint site), enabling fails with an error and the viewer stays off until the missing information is provided.

  • File Viewer Setup Wizard
  • Core Setup
  • OAuth 2.0 and OpenID Setup