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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Adding additional attachment durin Email print.

(0) ShareShare
ReportReport
Posted on by 80

Hi All,

I have a query on the best possible approach to customize standard print to email function. I have a requirement where I have posted free text invoice. This invoice has a document attached to it in docuref. Now when I print the invoice via mail, standard would make a PDF or HTML of the report and send it via Email . My requirement needs me to add extra attachments to this Email. I.e. I am printing Invoice FT0001 that already has 2 documentd attached in docuref, when I print the invoice to mail, along with the invoice report that gets attached along with the mail, would like to have the document attachments  from docuref too included in the attachments as seperate attachments in same mail.

I did a lot of research on Srsprintdestination class emaito method, where the logic of attaching of report files occurs, but the way the files get attached seems to be happening in kernel code which I cannot see. any thoughs on how best to proceed in this approch will be helpful.

Thanks

*This post is locked for comments

I have the same question (0)
  • Verified answer
    Vilmos Kintera Profile Picture
    46,149 on at

    I believe you have not been checking the correct places. Have a look at SrsReportRunMailer.emailReport() and SrsReportRun.printReportToEmail() class methods. You could place a breakpoint in there and send a report as mail to see what is happening, and work your way backwards in the callstack to figure out where and how to place your additional attachments.

    You can see the mailing bits and attachments there. They are referring the SysInetMail.sendMailAttach() and SysMailer classes, which are used for generating the actual e-mails.

  • Verified answer
    Sabarish Profile Picture
    80 on at

    Hi Thanks, customizing around SysInetMail.sendMailAttach() and SysInetMail.sendMailAttachEx() helped.

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…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans