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

Community site session details

Session Id :
Microsoft Dynamics NAV (Archived)

Sending report to customer through .

(0) ShareShare
ReportReport
Posted on by 782

Hi Experts,

I have created a custom document page i added action to generate invoice for this page and send custom report to customer.

Action Name ( Generate Invoice).

I want to perform two function on this action.

1 To Generate invoice ( 1st function are completed and its generate invoice).

2. Send custom report to customer.

Now i am trying when i click on action "Generate Invoice" it will generate invoice (Invoice are generating ) and send my custom report to the customer.

how to send custom report to customer ??

*This post is locked for comments

I have the same question (0)
  • Verified answer
    Binesh Profile Picture
    7,885 on at
    RE: Sending report to customer through .

    Hello,

    Follow the below links, already Saurav Dhyani Posted the article.

    Microsoft Dynamics NAV 2017 - Email From NAV Part 1.

    Microsoft Dynamics NAV 2017 - Email From NAV Part 3.

  • subrata.bauri Profile Picture
    1,144 on at
    RE: Sending report to customer through .

    First of all you have to save report output as PDF file and then Call two functions 1. CreateMessage & 2. AddAttachment from Codeunit 'SMTP Mail' to mail the report to customer.

  • subrata.bauri Profile Picture
    1,144 on at
    RE: Sending report to customer through .

    Code..

      REPORT.SAVEASPDF(REPORT::"Customer Ledger", FileName, Customer);

      Tofile := Rrt.DownloadToClientFileName(FileName, Tofile);

      SMTP.GET;

      CLEAR(Smail);

      Smail.CreateMessage(CompInfo.Name,SMTP."User ID",Customer."E-Mail",'Statement','Dear Sir,',TRUE);

      Smail.AddAttachment(FileName,'');

      Smail.Send;

  • Muhammad Arif Maseed Profile Picture
    782 on at
    RE: Sending report to customer through .

    Dear SUBARATA BAURI

    can you please explain the variables which you used eg (Smail). what is Smail if it is variable then it link with witch record ?

  • Muhammad Arif Maseed Profile Picture
    782 on at
    RE: Sending report to customer through .

    Dear SUBARATA BAURI

    can you please explain the variables which you used eg (Smail). what is Smail if it is variable then it link with witch record ?

  • subrata.bauri Profile Picture
    1,144 on at
    RE: Sending report to customer through .

    Variable "Smail" is Codeunit 400 (SMTP Mail)

  • Muhammad Arif Maseed Profile Picture
    782 on at
    RE: Sending report to customer through .

    sir this is working perfectly for nav but not for business central can you please do 1 example to send report through email in AL for business central 

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…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics NAV (Archived)

#1
Saurav.Dhyani Profile Picture

Saurav.Dhyani 2 Super User 2025 Season 2

#1
Alexander Ermakov Profile Picture

Alexander Ermakov 2

#3
RK-25090803-0 Profile Picture

RK-25090803-0 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans