Announcement

Collapse
No announcement yet.

Sending variables to PDF template

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Sending variables to PDF template

    Hello, I have a small problem.

    I have an override of Quote.Record.Panels.Items view and I have created a new variable here like this:

    data: function () { return { objects: this.objectList } }

    I see this variable in my Quote view, but now the problem is that when I try to convert this Quote to PDF - I can't reach the "objects" variable in the PDF template. How could I send this variable to PDF template? If I use the objects variable inside the PDF template I get an empty result.
    Last edited by The50; 01-30-2018, 03:25 PM.

  • #2
    Hello
    For PDF are valuable only server field values, data: function () is used only for the view

    Comment


    • #3
      Originally posted by tanya View Post
      Hello
      For PDF are valuable only server field values, data: function () is used only for the view
      So in order to print my new variable into PDF file I have to make a calculation on PDF creation module OR try to save this value in the database or something? Maybe overwriting the PDF module and calculating this custom field would be better idea?

      Comment


      • #4
        Define for your Entity a custom service with method loadAdditionalFieldsForPdf and set the value for needed field

        Comment

        Working...
        X