23 October 2022

Modify Email Subject for a report in D365 F&O from x++

 

Modify Email Subject for a report in D365 F&O from x++



public void printReport()
    {
        if (reportContract.parmRdpName() == "ProjInvoiceDP") //Dp classs name
        {
            ProjInvoiceContract contract = reportContract.parmRdpContract() as PSAProjInvoiceContract;         
          
            ProjInvoiceJour       invoiceJournal;
             
            select firstonly * from invoiceJournal where invoiceJournal.RecId == contract.parmProjInvoiceJourRecId();           //Get the which field we need to add in subjcet 
 
            printSettings.emailSubject(strFmt(" %1", invoiceJournal.ProjInvoiceId));
            printSettings.fileFormat(SRSReportFileFormat::PDF);
            printSettings.fileName(strFmt("SAProjInvoiceModern.Report")); //attached file output  
        }
 
        next printReport();
    }

1 comment:

Give me the commetns and solutions

How to add the Display method in the form level in D365 F&O

 The below examle is to add the form -Data source level adding display method and assigning to form design control.