How to add relationship fields in a PDF Template?

Collapse
X
 
  • Time
  • Show
Clear All
new posts

  • shalmaxb
    replied
    you can use this formula to fill a custom field (e.g. "username") in your entity. Then this field will appear in the dropdown of the PDF template.

    Leave a comment:


  • Triggerz
    replied
    Hi shalmaxb, thanks for your response. In the Formula Script I can use env\userAttribute('name') to get the name of the current user that is logged-in. How can I apply this so that it becomes available in the PDF template?

    Thanks

    Leave a comment:


  • shalmaxb
    replied
    Hi, the interface of the PDF templating is very intuitive and makes it easy to get any field of your entity. In the top region you have a drop down field for the available fields of the current entity. So look for "assignedUser" or the translation of that term in your language. The placeholder appears on the right side of the choosen field name, where you can copy it and insert it into your template. It is recommended to do all this work in the HTML-view of the editor.

    The current user (that one, who is logged in) is not available by default, but you may achieve the current user by coding.

    Leave a comment:


  • Triggerz
    replied
    Hi Paulina, thank you so much for your answer. It really helped and resolved my concern.

    May I also ask what is the Placeholder for the current user? I wanted to stamp the current user's name and date and time the pdf was generated.

    Thank you so much...

    Leave a comment:


  • Paulina
    replied
    Hi, each iterator will help https://docs.espocrm.com/user-guide/...#each-iterator

    Leave a comment:


  • Triggerz
    started a topic How to add relationship fields in a PDF Template?

    How to add relationship fields in a PDF Template?

    Hi,

    I created a pdf template for my entity CCashar. This entity has a one to many relationship to another entity CCasharitems.
    How can I add the fields of CCasharitems in the PDF Template that I am creating for the entity CCashar?

    Thanks & Regards...
Working...