web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
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.

(0) ShareShare
ReportReport
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.
           
I have the same question (0)
  • Mea_ Profile Picture
    60,286 on at

    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.

  • @NoMe Profile Picture
    217 on at

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

  • @NoMe Profile Picture
    217 on at

    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?

  • vsr Profile Picture
    25 on at

    Did you got the solution

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 > Finance

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans