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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Business Central forum

Generate Income statement and email to relevant person periodically?

(0) ShareShare
ReportReport
Posted on by 80

So, want i want to do is generate income statements on demand and email them to relevant person in my department periodically. I understand the concept of scheduling but to be able to set user selection (such as DateFilter etc.) i understand that we have to code it, but as i am a beginner i do not know how i can achieve this functionality.

I have the same question (0)
  • Suggested answer
    Guillaume Lafond Profile Picture
    75 on at

    Hi,

    You would need to create a code unit that could handle both request and a new page or a page extension that would allow you to trigger the event manually.

    By adding an action to one of your page (docs.microsoft.com/.../devenv-adding-actions-to-a-page) you could do the manual trigger.

    The code unit would need to use the Report Object to be able to generate your statement (docs.microsoft.com/.../devenv-report-object)

    To send your email through code, you'll need to use codeunit 397 or 400 to be able to attach your report and send it.

    I hope this hints you in the right direction but ideally, I would advise trying to leverage the Scheduling option as much as possible rather than going through all this code but if you've already tried everything you can and that still doesn't fit your requirements the above should be a good start.

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

News and Announcements

Season of Giving Solutions is Here!

Quick Links

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Coming on 11/8!

In our never-ending quest to help the Dynamics 365 Community members get answers faster …

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard > Business Central

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans