Skip to main content

Notifications

Dynamics 365 Community / Forums / Finance forum / An attempt was made to...
Finance forum

An attempt was made to set a report parameter 'CreatedTransactionId' that is not defined in this report.

Posted on by 217

Hi,

I am trying to confirm sales order through code and using print management setting to email report automatically. Here is the code below.

 confirm           = SalesFormLetter::construct(DocumentStatus::Confirmation);
                SRSPrintDestinationSettings = new SRSPrintDestinationSettings(confirm.printerSettingsFormletter(PrintSetupOriginalCopy::Original));
                SRSPrintDestinationSettings.emailTo(email);
                SRSPrintDestinationSettings.PrintMediumType(SRSPrintMediumType::Email);
                SRSPrintDestinationSettings.numberOfCopies(1);
                SRSPrintDestinationSettings.emailSubject(strfmt('Organogenesis, Inc. Order Confirmation PDF for %1', _salesTable.SalesId));
                SRSPrintDestinationSettings.emailAttachmentFileFormat(SRSReportFileFormat::PDF);
                SRSPrintDestinationSettings.overridePageSettings(true);
                SRSPrintDestinationSettings.overridePrintContractSettings(true);
                
                confirm.updatePrinterSettingsFormLetter(SRSPrintDestinationSettings.Pack(), PrintSetupOriginalCopy::Original);
                
                confirm.update(_salesTable, SystemDateGet(), SalesUpdate::All, AccountOrder::None, NoYes::Yes/*Proforma*/, NoYes::Yes);
While generating report it gives error saying an attempt was made to set a report parameter 'Created transaction id' is not defined in this report.
Please help.
           
  • vsr Profile Picture
    vsr 25 on at
    RE: An attempt was made to set a report parameter 'CreatedTransactionId' that is not defined in this report.

    Did you got the solution

  • @NoMe Profile Picture
    @NoMe 217 on at
    RE: An attempt was made to set a report parameter 'CreatedTransactionId' that is not defined in this report.

    Even I am trying to print report from use printmanagementsetting it is not generating report and giving same error. Please tell what am I missing?

  • @NoMe Profile Picture
    @NoMe 217 on at
    RE: An attempt was made to set a report parameter 'CreatedTransactionId' that is not defined in this report.

    Yes it is aloowed to print from ui as it is sales confirmstion report

  • Mea_ Profile Picture
    Mea_ 60,278 on at
    RE: An attempt was made to set a report parameter 'CreatedTransactionId' that is not defined in this report.

    Hi @NoMe,

    Can you please confirm that you can print that report from UI ? You often has this error if you've done some incorrect customization to report itself but is not connected to this code.

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

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Coming on 11/8!

In our never-ending quest to help the Dynamics 365 Community members get answers faster …

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,188 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,030 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans