Email to PDF

NormajmNormajm Member Posts: 82
We are using Nav 5.0(1) on Cside. We are also using the E-ship module which has an email function. We are using this successfully to send confirmation and shipping info. However, we also want to use it to send invoice PDF via email.

They have some "do-it-yourself" code chanages to use PDFCreator. The changes to the SaveReportasHTML function are very straight forward, but I don't understand what is being referred to with the "implement the following log". I have looked through the "Sales Invoice E-Mail" but I don't see anything that looks like the "before" section. I can find the "InitializeRequest" but it looks different.

Implement the following log in the E-Mail Sending reports.
The code below is using the Customer for applying the filter. The record should be change to the one used in the existing code in the SaveReportasHTML function.

--- Before ----
Text013@1013 : TextConst 'ENU=%1 is not a supported level.';
      Text014@1014 : TextConst 'ENU=Get E-Mail List must be empty.';

    PROCEDURE InitializeRequest@1(NewCustomerNo@1000000000 : Code[20]);
--- After -----
      Text013@1013 : TextConst 'ENU=%1 is not a supported level.';
      Text014@1014 : TextConst 'ENU=Get E-Mail List must be empty.';
      PDFCreator@1240030003 : Automation "{1CE9DC08-9FBC-45C6-8A7C-4FE1E208A613} 4.1:{3A619AE4-50EC-46C8-B19E-BE8F50DD2F22}:'PDFCreator'.clsPDFCreator";
      PDFCreatorOption@1240030002 : Automation "{1CE9DC08-9FBC-45C6-8A7C-4FE1E208A613} 4.1:{F8F15298-30FD-427C-BDFA-55E9AB615632}:'PDFCreator'.clsPDFCreatorOptions";
      PDFCreatorError@1240030001 : Automation "{1CE9DC08-9FBC-45C6-8A7C-4FE1E208A613} 4.1:{082391C9-8188-4364-B4FD-66A1524B2097}:'PDFCreator'.clsPDFCreatorError";
      DefaultPrinter@1240030000 : Text[200];

    PROCEDURE InitializeRequest@1(NewCustomerNo@1000000000 : Code[20]);

This is what our InitializeRequest looks like:
InitializeRequest(NewInvoiceNo : Code[20])
InvoiceNo := NewInvoiceNo;

IF NewInvoiceNo = 'SHOWHELP' THEN
  MESSAGE(
    Text007 +
    Text008 +
    Text009 +
    Text010 +
    Text011 +
    Text012 +
    Text013 +
    Text014 +
    Text015);

Any assistance would be much appreciated.

Comments

  • ara3nara3n Member Posts: 9,256
    The example in the document is for customer statement. In your report it looks like you sending invoice so some changes will need to happen.

    the before and after is if you export the object as text you will see the local variables first.

    So just add the variables manually if you like if you don't want to export the object as text and compare them.
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
Sign In or Register to comment.