web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Suggested Answer

How to View Azure Blob Files Directly in a Browser from Business Central?

(1) ShareShare
ReportReport
Posted on by

Hello Community,

I’m working on a Business Central (on-premises/SaaS) implementation where I need to integrate with Azure Blob Storage for document management. The goal is to allow users to:

  1. Upload files (e.g., PDFs, images, etc.) to Azure Blob Storage from Business Central.
  2. Preview files directly in a web browser by clicking a button (without downloading the file).
  3. Download files if needed.

Here’s my current setup and progress:

  • I’ve already set up Azure Blob Storage integration in Business Central and can successfully upload and download files using AL code.
  • The files are stored in a private container in Azure Blob Storage.
  • I am able to generate a Shared Access Signature (SAS) URL programmatically for secure access to files.

Challenge:

While I can generate the SAS URL, I need guidance on how to open the file in a browser for web view directly from Business Central. For example:

  • When a user clicks "View Document," the file (e.g., PDF) should open in a new browser tab instead of being downloaded locally.
  • The web view should work for commonly supported file types (e.g., PDF, PNG, JPEG).

Key Questions:

  1. What is the best approach to implement the "View Document" functionality in AL? Specifically:
    • How do I dynamically generate and open a SAS URL in the browser using the HYPERLINK function?
    • Are there better alternatives to HYPERLINK for opening files in a new browser tab?
  2. How can I ensure the browser renders files like PDFs and images correctly?
    • Should I set the Content-Type during the file upload process to Azure Blob Storage?
  3. Are there any code examples or best practices for this use case?

Additional Information:

  • Business Central version: <Provide Version, e.g., 22.x SaaS>
  • Azure Blob Storage setup: Private container with SAS token-based access.

I appreciate any guidance, code examples, or alternative approaches you can provide. Thank you in advance for your help!


# Azure Blob Storage

#Business Central AL
#File Management
#Web Browser Integration
#Document Preview
I have the same question (0)
  • Suggested answer
    Gerardo Rentería García Profile Picture
    25,157 Most Valuable Professional on at
  • Suggested answer
    Khushbu Rajvi. Profile Picture
    20,275 Super User 2025 Season 2 on at
    Yes, its possible. Try by using the content type as below.
     For the pdf.
    headers.Add('Content-Type', 'application/pdf');
    when you click on the link file will automatically open in the browser.
     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 3,229

#2
Jainam M. Kothari Profile Picture

Jainam M. Kothari 1,867 Super User 2025 Season 2

#3
YUN ZHU Profile Picture

YUN ZHU 1,153 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans