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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

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

How to save the file in shared Network folder

(1) ShareShare
ReportReport
Posted on by 244
Hi Team,

I have written a codeunit which will run through JOB QUEUE and save the report in an predefined local folder.

However when i want to save the same file to a shared network folder, I am getting error. How do I achieve this?

I am using ON-PREMISE BC and I am using ExcelReport.SaveAsExcel(FileNameAndPath); to save the report in local folder which is working properly.
 
    trigger OnRun()
    var
        FileNameAndPath: Text[250];
        LoanRec: Record xxx;
        ExcelReport: Report /xxx Excel Report/;
        Startdate: Date;
        Enddate: Date;
    begin
        Startdate := 20210101D; //Requirement: Start Date 1/1/2021
        Enddate := Today;
        LoanRec.SetCurrentKey(/Creation Date/);
        LoanRec.SetRange(/Creation Date/, Startdate, Enddate);
        ExcelReport.SetTableView(LoanRec);
        FileNameAndPath := '////xxx//xxx//xx//xx//xx//xxx Excel Report.xlsx';
        ExcelReport.SaveAsExcel(FileNameAndPath);
    end;

I have the full access to the network folder and when I run the job queue I am getting below error

‘Either the caller does not have the required permission or the specified path is read-only.’

Please provide a solution or alternate way to save the file in network folder.

Thanks in advance.
Rajaneesh H
I have the same question (0)
  • Suggested answer
    YUN ZHU Profile Picture
    98,464 Super User 2026 Season 1 on at
    Hi, Please check the following two places. The first is the user set in NAV Instance. Does this user have access rights to the shared folder?
    Second, please check whether the user running the Job queue has file access permissions.
    And hope the following helps.
     
    Thanks.
    ZHU
     
     

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

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

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 1,850 Super User 2026 Season 1

#2
YUN ZHU Profile Picture

YUN ZHU 1,084 Super User 2026 Season 1

#3
Dhiren Nagar Profile Picture

Dhiren Nagar 959 Super User 2026 Season 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans