Dynamics AX Blog - Beiträge vom 16 November 2014
Bestellung per Code druckenDer nachstehende Job demonstriert, wie man in Dynamics AX 2012 eine vorhandene Bestellung per Code (nach-)drucken kann. Im Beispiel erfolgt die Ausgabe am Bildschirm. static void printPurchaseOrderThroughCode(Args _args)
{ PurchPurchOrderJournalPrint purchPurchOrderJournalPrint; Set set = new Set(Types::Record); SRSPrintDestinationSettings srsPrintDestinationSettings; // Add record set.add(VendPurchOrderJour::findRecId(5637179849)); // Set printer settings srsPrintDestinationSettings = new SRSPrintDestinationSettings(); srsPrintDestinationSettings.fileFormat(SRSReportFileFormat::Screen); // Initalize purchPurchOrderJournalPrint = PurchPurchOrderJournalPrint::construct(); purchPurchOrderJournalPrint.parmPrintFormletter(NoYes::Yes); purchPurchOrderJournalPrint.parmUsePrintManagement(false); purchPurchOrderJournalPrint.parmPrinterSettingsFormLetter(srsPrintDestinationSettings.pack()); purchPurchOrderJournalPrint.printJournal(set); } |
|
|
|
|
|
|
Der nachstehende Job demonstriert, wie man in Dynamics AX 2012 eine vorhandene Auftragsbestätigung per Code (nach-)drucken kann. Im Beispiel erfolgt die Ausgabe am Bildschirm.
{
SalesConfirmJournalPrint salesConfirmJournalPrint;
Set set = new Set(Types::Record);
SRSPrintDestinationSettings srsPrintDestinationSettings;
// Add record
set.add(CustConfirmJour::findRecId(5637155842));
// Set printer settings
srsPrintDestinationSettings = new SRSPrintDestinationSettings();
srsPrintDestinationSettings.fileFormat(SRSReportFileFormat::Screen);
// Initalize
salesConfirmJournalPrint = SalesConfirmJournalPrint::construct();
salesConfirmJournalPrint.parmPrintFormletter(NoYes::Yes);
salesConfirmJournalPrint.parmUsePrintManagement(false);
salesConfirmJournalPrint.parmPrinterSettingsFormLetter(srsPrintDestinationSettings.pack());
// Print
salesConfirmJournalPrint.printJournal(set);
}