Automatic Creation of a PDF from a customer invoice in dynamics ax 4.0

Source: Internet
Author: User
Automatic
Creation of a PDF from a customer invoice in dynamics ax 4.0 Good morning, the following code snippet will create a PDF from a custinvoicejour record,
Without any user intervention, using only the standard ax4 epsenddocument
Class. Public static void epsenddocumenttest (ARGs _ ARGs)
{

Epsenddocument senddocument;
Custinvoicejour;

Filename filename;
; Select firstonly custinvoicejour; filename = winapi: gettemppath () require 'myinvoice.pdf '; senddocument = new epsenddocument (custinvoicejour );

Senddocument. parmoriginal (true );

Senddocument. parmfilename (filename); // make document will run the report and send it to a PDF file
With
// The path specified in Filename

Senddocument. makedocument ();
} The file shoshould end up in C:/example E ~ 1/***/locals ~ 1/temp/myinvoice.pdf on
Win32 installations. I found this while looking at Ep weblet 'epdocugetweblet '.
The epsenddocument class supports a lot of other standard reports, such
Quotations, etc.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.