Announcement

Collapse
No announcement yet.

PDF template definition

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

  • PDF template definition

    Hello.

    I'm trying to define a PDF template to get information from some entities I've defined.

    These are transportation orders with a data structure similar to that of the Quotes.

    There is a transportation order that has associated N lines of products to be transported.

    I was checking how the Quotes PDF template is made to replicate it.

    I noticed that in Quotes entity there is an itemList field that allows you to define the body of the PDF. I guess it contains the fields that could be shown in the PDF.

    What I would like to know is how can I define that field in the transport entities


    Thank you very much.

  • #2
    yo necesito algo parecido, quiero imprimir en pdf los registros de una entidad (oportunidad), pero al momento de crear una platilla me lo exporta en varias paginas.

    Comment


    • #3
      Hi,
      1. you can use 'Available Placeholders' for using them to fetch data.
      2. To find out of how the PDF Template performs for the item list please press edit the 'Body' section -> press the code view button </> and investigate the code.

      Comment


      • #4
        Thanks Maximus.

        I reviewed the Body section of the code. It has theis instruction {{#each itemList}} that allow to retrieve data for some fields of the related records.

        And itemList is a Json Array field defined for the main record.

        So my questions are:

        How do I define a Json Array field in the main entity? Json Array is not one of the options provided

        What info do I need to fill the Json Array?

        Thanks in advance

        Comment


        • #5
          Hi esendino,
          Sorry for the delayed reply.

          > It has theis instruction {{#each itemList}} that allow to retrieve data for some fields of the related records

          Right. So if you want to use it for your custom entity and retrieve this data in a PDF template you need to first reproduce all relationships and field structure for it as it works for example in the Quote and quoteItems have.
          Otherwise, it won't work.
          BTW. For the 'Array' type field you can use placeholders to retrieve data into PDF.

          Comment


          • #6
            Hi Maximus

            Sorry for being delayed. I missed your answer.

            You said "Right. So if you want to use it for your custom entity and retrieve this data in a PDF template you need to first reproduce all relationships and field structure for it as it works for example in the Quote and quoteItems have.
            Otherwise, it won't work."

            It makes full sense. My question is: How I can reproduce it?

            In forst place it´s based on a field called temList, That field is of type Json Array

            But if I try to define a new attribute, the Json Array is not allowed.

            Comment

            Working...
            X