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

file does not exist

(0) ShareShare
ReportReport
Posted on by 962

I am trying to send  a custom document page as pdf mail attachment  but I get this message "file does not exist ".

When I check the path to the temp folder the file exist.

I am using 365 BC On-premise (spring)

TempEmailItem refers to Nav's Table 9500 Email Item

Customer.TESTFIELD("E-Mail");
WITH TempEmailItem DO BEGIN
"Send to" := Customer."E-Mail";
Subject := 'Sales Statistics';
GenerateEmailBody(Customer,EmailBody);
Body := EmailBody.Blob;

"Attachment File Path" := GenerateEmailAttachment(Customer."No.");
"Attachment Name" := 'Open Customer Entries.pdf';
"Plaintext Formatted" := FALSE; 


EXIT(Send(FALSE));

END;

I have the same question (0)
  • Suggested answer
    keoma Profile Picture
    32,729 on at

    maybe the temp path is on client side, should be on server side.

  • SED Profile Picture
    962 on at

    Please find below the path for the temp:

    C:\ProgramData\Microsoft\Microsoft Dynamics NAV\140\Server\MicrosoftDynamicsNavServer$JAF\users\default\HATUA22\EDEMS\TEMP

  • Suggested answer
    keoma Profile Picture
    32,729 on at

    when you compare the resulting "Attachment File Path" and the physical path incl. filename, is that really exactly the same? also check, if the file has a filesize > 0 and that the service account (bc service) has the permission to read from that path.

  • SED Profile Picture
    962 on at

    when you compare the resulting "Attachment File Path" and the physical path incl. filename, is that really exactly the same?  Yes it is

    also check, if the file has a filesize > 0 : Yes it greater than 0

    and that the service account (bc service) has the permission to read from that path : I use Network Service account and it has full access rights including "read & write" permission

  • Suggested answer
    keoma Profile Picture
    32,729 on at

    strange.

    restart the bc service.

    use a different file.

    try again.

  • SED Profile Picture
    962 on at

    Still giving the same message

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 2,917

#2
Jainam M. Kothari Profile Picture

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

#3
YUN ZHU Profile Picture

YUN ZHU 1,025 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans