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

Ledger Voucher creation Framework and x++ code to create ledger voucher

 Please click her for MS reference file Below is the out of the box example reference and code. SalesInvoiceJournalPostSubBill_Extension->...