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 :
Small and medium business | Business Central, N...
Answered

Send Report pdf on Mail when Mentioned the Invoice No on report layout .

(0) ShareShare
ReportReport
Posted on by 200

Report-layout-rdlc.png

Here in this report when I insert invoice no and select preview option I want to send the report pdf directly to mail instead of viewing it. How can directly send report pdf to email from report layout after filtering on invoice no in Al code?

Please any ideas?

Thankyou 

I have the same question (0)
  • Verified answer
    Mohana Yadav Profile Picture
    60,979 Super User 2025 Season 2 on at
    RE: Business Central

    Why cant use Send action on the Posted Sales Invoice page?

    Or if you need in request page then check how the Send code is and change accordingly.

    PS: please provide a proper name/subject for the post instead of Business Central

  • NAV_with_Narang Profile Picture
    2,250 Moderator on at
    RE: Business Central

    AS suggested by Mohana, please use the OOTB Send button available on most pages. Link for reference:

    learn.microsoft.com/.../ui-how-send-documents-email

    usedynamics.com/.../

  • Dividutt Profile Picture
    200 on at
    RE: Business Central

    But I want to get only one sales order when I put the specific invoice no on report and filter only that details on mail how can we do that on al code,

    How Can I filter for one invoice number for sales invoice in report in code al

  • Suggested answer
    Inge M. Bruvik Profile Picture
    1,065 Moderator on at
    RE: Send Report pdf on Mail when Mentioned the Invoice No on report layout .

    Maybe this post can be helpful for you.

    community.dynamics.com/.../filter-a-report-based-on-open-record

  • Dividutt Profile Picture
    200 on at
    RE: Send Report pdf on Mail when Mentioned the Invoice No on report layout .

    Yes,this answers 50% of my query,

    but I have a rdl report made by other user, So I am uploading it in new layout and entering the invoice number it should run in background and print only that record of entered invoice number in attached pdf in mail

    ' I have not created any custom report'

    So this link u provided can be used  here also?'

    Please verify

    Thankyou

  • Suggested answer
    Inge M. Bruvik Profile Picture
    1,065 Moderator on at
    RE: Send Report pdf on Mail when Mentioned the Invoice No on report layout .

    Yes, as long as you know the report number / report name you can change it to any report in the system.

    If it is a standard report you will have access to all of them. If it is a custom report made in another App you will need to define a dependency to that App in order to run the report from you AL code.

  • Verified answer
    Govinda Kumar Profile Picture
    2,304 Moderator on at
    RE: Send Report pdf on Mail when Mentioned the Invoice No on report layout .

    Hi Dividutt,

    I'm glad to see that many helpful community members have already provided you with useful suggestions, I just wanted to add to the discussion here.

    Based on my understanding of your original post, it sounds like you want to send a report PDF to an email address instead of previewing it. You can do this by setting up the printer in the printer management settings with the 'Printer Email Address' your destination where you want to send the report.

    SMTP6.PNG

    SMTP81.png

    Then, when filtering the report, instead of selecting "Handled by browser" in the printer option

    SMTP82.png

    You can select your newly created printer, and click the printer

    SMTP83.png

    The report will automatically be sent to the specified email address in your printer.
    This way, you can avoid manually sending the report every time.

    Hope this helps!

    Best regards.

  • Suggested answer
    YUN ZHU Profile Picture
    93,915 Super User 2025 Season 2 on at
    RE: Send Report pdf on Mail when Mentioned the Invoice No on report layout .

    Hi, Why not try the Email function directly?

    pastedimage1680479788232v1.png

    pastedimage1680479857415v2.png

    And you can add other default attachments, more details: https://yzhums.com/32793/

    Hope this helps as well.

    Thanks.

    ZHU

  • Dividutt Profile Picture
    200 on at
    RE: Send Report pdf on Mail when Mentioned the Invoice No on report layout .

    Hi,

    I have a standard report, I am trying to filter one sales order with sales invoice number I am not getting that in my pdf attachment,I am getting all orders so how to filter that in my codeunit? Please can you help

  • Mohana Yadav Profile Picture
    60,979 Super User 2025 Season 2 on at
    RE: Send Report pdf on Mail when Mentioned the Invoice No on report layout .

    Please share your codeunit code

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…

Pallavi Phade – Community Spotlight

We are honored to recognize Pallavi Phade as our Community Spotlight honoree for…

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

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 2,225

#2
Sumit Singh Profile Picture

Sumit Singh 2,123

#3
YUN ZHU Profile Picture

YUN ZHU 1,813 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans