
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.
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.