<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/css" href="https://www.schweda.net/style_feed.css" ?>
<rss version="2.0" 
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
    xmlns:atom="http://www.w3.org/2005/Atom"	
	xmlns:dc="http://purl.org/dc/elements/1.1/" > 
<channel>
    <title>schweda.net - Blog</title>
    <link>https://www.schweda.net/</link>
    <description>schweda.net - Blog - Blog-Beitraege</description>
    <language>de-at</language>
    <copyright>Copyright 2006-2026</copyright>
    <generator>schweda.net</generator>
    <managingEditor>heinz.schweda@schweda.net (Heinz Schweda)</managingEditor>
    <webMaster>heinz.schweda@schweda.net (Heinz Schweda)</webMaster>
    <category>Blog</category>
	<atom:link href="https://schweda.net/blog_rss.php?bid=453" rel="self" type="application/rss+xml" />
<item>
<title><![CDATA[AX 2012: Dokument per Code drucken]]></title>
<description><![CDATA[
<p>Mit dem folgenden Job kann man per Code eine Auftragsbest&auml;tigung nachdrucken und diese dabei als PDF-Datei ausgeben lassen.
</p>


<p>Mit Hilfe von &auml;hnlich benannten Klassen wie der hier verwendeten <em>SalesConfirmJournalPrint </em>sollten auch andere Dokumente wie Rechnung oder Lieferschein nachdruckbar sein.
</p>


<pre class="pre_blog_axcode">
static void printSalesConfirmThroughCode(Args _args)
{
    SalesConfirmJournalPrint SalesConfirmJournalPrint;
    set set = new set(Types::Record);
    SRSPrintDestinationSettings SRSPrintDestinationSettings;
    
    // Add record
    set.add(CustConfirmJour::findRecId(5637150827));
    
    // Set printer settings
    SRSPrintDestinationSettings = new SRSPrintDestinationSettings();
    SRSPrintDestinationSettings.fileFormat(
        SRSReportFileFormat::PDF);
    SRSPrintDestinationSettings.fileName(@&#39;c:&#092;ab.pdf&#39;);    
    SRSPrintDestinationSettings.printMediumType(
        SRSPrintMediumType::File);
    SRSPrintDestinationSettings.numberOfCopies(1);
    SRSPrintDestinationSettings.overwriteFile(true);
    
    // Initalize 
    SalesConfirmJournalPrint = SalesConfirmJournalPrint::construct();
    SalesConfirmJournalPrint.parmPrintFormletter(NoYes::Yes);
    SalesConfirmJournalPrint.parmUsePrintManagement(false);
    SalesConfirmJournalPrint.parmPrinterSettingsFormLetter(
        SRSPrintDestinationSettings.pack());
    
    // Print
    SalesConfirmJournalPrint.printJournal(set); 
}
</pre>]]></description>
<category>Microsoft Dynamics AX (Axapta)</category>
<pubDate>Thu, 31 Jan 2013 17:07:00 +0100</pubDate>
<link>https://www.schweda.net/blog_ax.php?bid=453</link>
<comments>https://www.schweda.net/blog_ax.php?bid=453</comments>
<guid isPermaLink="true">https://www.schweda.net/blog_ax.php?bid=453</guid>
<author>heinz.schweda@schweda.net (Heinz Schweda)</author>
<wfw:commentRss>https://www.schweda.net/blog_ax.php?bid=453</wfw:commentRss>
</item>
</channel>
</rss>	
