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
Please share your codeunit code
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
Hi, Why not try the Email function directly?
And you can add other default attachments, more details: https://yzhums.com/32793/
Hope this helps as well.
Thanks.
ZHU
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.
Then, when filtering the report, instead of selecting "Handled by browser" in the printer option
You can select your newly created printer, and click the printer
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.
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.
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
Maybe this post can be helpful for you.
community.dynamics.com/.../filter-a-report-based-on-open-record
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
AS suggested by Mohana, please use the OOTB Send button available on most pages. Link for reference:
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
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,188 Super User 2024 Season 2
Martin Dráb 230,030 Most Valuable Professional
nmaenpaa 101,156