Open Forum

Expand all | Collapse all

Alter default body text for SendAsPDF function

Jump to Best Answer
  • 1.  Alter default body text for SendAsPDF function

    Posted Apr 08, 2020 05:07 PM
    Hello!

    I need to alter the default text in the body of the email that SendAsPDF function from page 143 sends.  When stepping through the code, the data for the email body seems to come from table 14005144 Email Communication, but the table does not have any text for the body, so this is confusing me.  Any direction would be greatly appreciated.  Thanks!

    ------------------------------
    Thank you!
    Vivian
    ------------------------------
    Academy - Online Interactive Learning from Experts


  • 2.  RE: Alter default body text for SendAsPDF function

    TOP CONTRIBUTOR
    Posted Apr 08, 2020 05:23 PM
    Vivian,

    Based on the Table ID, this is an add-on product, maybe Lanham? If you can provide that additional information, you may still be able to get help here.

    ------------------------------
    Cynthia Priebe
    New View Strategies
    "The NAV & BC training and process experts"
    ------------------------------

    Academy - Online Interactive Learning from Experts


  • 3.  RE: Alter default body text for SendAsPDF function

    Posted Apr 08, 2020 05:41 PM
    I forgot to mention that it is NAV 2016. What other information would you need? I am not sure what add-on it could be.  We have many add-ons, but not Lanham.  That doesn't sound familiar.  Thanks!

    ------------------------------
    Thank you!
    Vivian
    ------------------------------

    Academy - Online Interactive Learning from Experts


  • 4.  RE: Alter default body text for SendAsPDF function

    Posted Apr 08, 2020 07:07 PM
    After more digging, I found that the text comes from table 14005144.  This is the function that gets the text.

    ReadInvoiceBody() BigBody : Text[1024]
    Rec.CALCFIELDS(InvoiceBodyBlob);
    Rec.InvoiceBodyBlob.CREATEINSTREAM(InBody);
    InBody.READ(BigBody);

    Now my question has changed to: Since I cannot view the Blob in the table blob field "InvoiceBodyBlob", how can I change the text that is stored in the Blob?

    ------------------------------
    Thank you!
    Vivian
    ------------------------------

    Academy - Online Interactive Learning from Experts


  • 5.  RE: Alter default body text for SendAsPDF function
    Best Answer

    Posted 29 days ago
    I ended up creating a text constant with the link to the terms and conditions and adding that to the message.  That worked for me:

    BodyText is the original message that I was trying to change. Text001 and Text002 were created by me.
    BodyText := BodyText + '<br><br>' + Text001 + Text002;

    ------------------------------
    Thank you!
    Vivian
    ------------------------------

    Academy - Online Interactive Learning from Experts


If you've found this thread useful, dive deeper into User Group community content by role