Print to pdf with related entities

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Yarri
    Junior Member
    • Jun 2018
    • 14

    Print to pdf with related entities

    Hello,

    I have an entity which has 3 related entities and i'd like to be able to do a print to PDF to the entity which has the related entities
    and have all the data of the related entities, just like in quotes. Although, I've noticed that the way items are handled in quotes is
    by a JsonArray. Is there a way to do a similar thing with related entities, loop through them and print the data in the PDF or we have
    to have some sort of a jsonArray?

    Thank you.
    Last edited by Yarri; 06-06-2018, 01:15 PM.
  • Yarri
    Junior Member
    • Jun 2018
    • 14

    #2
    I figured it out already.

    Comment

    • Sloff
      Member
      • Feb 2018
      • 47

      #3
      Yarri how did you achieve this? Did you have to use a jsonArray in the end?

      Comment

      • Yarri
        Junior Member
        • Jun 2018
        • 14

        #4
        Sloff Yes, I set the value of the jsonArray in the loadAdditionnalFields and loadAdditionnalFieldsForPdf functions in custom/Espo/Custom/Services/{Entity-Name}.php.
        There's an example in application/Espo/Modules/Advanced/Services/Quote.php

        Comment

        • Sloff
          Member
          • Feb 2018
          • 47

          #5
          Yarri Thank you!

          Comment

          • eymen-elkum
            Active Community Member
            • Nov 2014
            • 472

            #6
            Possible in Espocrm v > 5.9.0 :

            https://docs.espocrm.com/user-guide/...elated-records
            CEO of Eblasoft
            EspoCRM Expert since 2014
            Full Stack Web Developer since 2008
            Creator of Numerous Successful Extensions & Projects​

            Comment

            Working...