Setting report name when sending through print management using Email (D365 Finance and Operations)
In this blog, I would like to share a class which can be extended to be use for renaming report file name when sending through email using the print management.
Using COC of the method onToEmail() of class SRSPrintDestinationSettingsDelegates you can rename your report file name for email purposes.
public boolean onToEmail(SrsReportRunPrinter printer, SrsReportDataContract dataContract, Microsoft.Dynamics.AX.Framework.Reporting.Shared.ReportingService.ParameterValue[] paramArray)
{
if(dataContract.parmReportName() == 'PracticeForSalesInvoice.Report')
{
dataContract.parmPrintSettings().fileName("asadsInvoice");
}
boolean ret = next onToEmail( printer, dataContract,paramArray);
return ret;
}
Above example shows the coc of the method OnToEmail().
In this way , you can rename your report file when using Email through print management.
Regards
Comments
Post a Comment