Add custom field to PDF template

I’ve added a couple of custom fields to the Invoice module and want to include them in an Invoice PDF template. When I add them to the template nothing appears. It seems this is not the correct method; can someone tell me how it’s done?
Thanks in advance.

Hi @127bit1,
to include custom fields in an Invoice PDF template in SuiteCRM, you need to follow these steps:

  1. In Studio, go to the Invoice module and open the layout editor for the Detail View.
  2. Add the custom fields to the layout and save the changes.
  3. Go to Admin > Repair > Quick Repair and Rebuild and run the repair.
  4. Go to Admin > Repair > PDF Templates and run the repair.
  5. Go to Admin > PDF Templates and open the template you want to edit.
  6. In the template editor, use the syntax $invoice.field_name to include the custom fields in the template.

For example, if you added a custom field called “my_custom_field” to the Invoice module, you would include it in the template like this:

My Custom Field: $invoice.my_custom_field

Make sure to save the changes to the template and then generate a new PDF to see the custom fields included in the output.

Hello mbaranzke, thanks for taking the time to reply.
I followed your instructions, however at #4, there is no “PDF Templates” Repair list option in v7.11.18.
I continued from #5 there, and should mention the module is ‘Invoices’ not ‘Invoice’.
My custom field is ‘paid_date_c’, I adjusted the name to ‘$invoices.paid_date_c’ but it still printed that literal field name and not its value. I’ll try any other suggestions, thanks.

Anyone know how to add a custom field from the Invoices module to a PDF template in 7.11.18?

Step 1: Create a PDF Invoice in PDF Templates (or edit one you already have) Type = Invoices

Step 2: Edit the layout as you wish and add the field to the template. To insert a field just select your field from the dropdown and insert it anywhere you like.

Step 3: Print your invoice with the new PDF template.