Skip to main content

Posts

Showing posts from January, 2024

Send email with report attachment using x++

 Hello Devs! Sending auto email functionality is one of the most common functionality that client asks for. Similarly, I have documented this blog to help people to achieve this functionality.  Pre Requisites for this approach: 1)  SMTP setting must be configured based on server.  Core Logic : public void sendEmailwithAttachment(SalesTable _salesTable)     {         Microsoft.Dynamics.AX.Framework.Reporting.Shared.ReportingService.ParameterValue[]                    parameterValueArray;         SysOperationQueryDataContractInfo       sysOperationQueryDataContractInfo;         SrsReportRunController                  reportRunController;         SRSReportExecutionInfo                  reportExecutionInfo;         SRSPrintDestinationSettings             printDestinationSettings;         SRSReportRunService                     srsReportRunService;         SRSProxy                                srsProxy;         Object                                  dataContractInfoObject;         Map