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

Announcements

No record found.

News and Announcements icon
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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Joris dG Profile Picture

Joris dG 5

#2
Andrew Jones a1x Profile Picture

Andrew Jones a1x 2

#3
GL-01081504-0 Profile Picture

GL-01081504-0 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans