CRMJettyBack to crmjetty.comContact us
Menu
Docs / Guides

CRMJetty Portal

Works with
Docs / Dynamics 365

Dynamics 365 Customer Portalv6.3.0

Docs / Salesforce

Salesforce Customer Portalv6.3.0

Docs / Business Central

Business Central Portal

Guides / Payments

How to Let Customers Download Invoice PDFs

5 min readUpdated
Short answerCreate and publish an invoice template under Settings → Portal Settings → Template Scripting → Downloadable Template. Then, in the List widget that shows invoices, turn on Template Download and select the template. Portal users then select Download on the invoice list to get the PDF.

Portal users can download their invoices as PDF files from the invoice list in the portal. You decide how the PDF looks with a downloadable template, then turn on downloads for the list that shows invoices.

Note: This feature is available on selected plans. See Pricing.

Before you start

Create the invoice template

The template sets the layout of the PDF: which invoice fields it shows and how they look.

  1. Go to Settings → Portal Settings → Template Scripting.
  2. Open the Downloadable Template section and select Create.
  3. In the pop-up, enter a Title, for example Invoice PDF, and select Save. The template creation page opens.
  4. In Data Source, select your invoice entity.
  5. Enter the template code in the HTML, CSS and JavaScript sections.
  6. Select Publish.
Downloadable Template creation page with Data Source set to the invoice entity and the HTML, CSS and JavaScript sections
Downloadable Template creation page with Data Source set to the invoice entity and the HTML, CSS and JavaScript sections
Downloadable Template creation page with Data Source set to the invoice entity and the HTML, CSS and JavaScript sections
Downloadable Template creation page with Data Source set to the invoice entity and the HTML, CSS and JavaScript sections

Tip: Select Template Help for a quick guide to building templates.

Only published templates can be used. Select Save as Draft instead of Publish to finish the template later.

Add invoice lines with Subgrid Support

To include related records in the PDF, such as the line items of an invoice, turn on Subgrid Support in the template and fill in these settings:

Setting What to select
Entity The related entity, for example the invoice line entity.
Relationship The relationship between the invoice and the related entity.
Fields The fields of the related records to include.

For more on writing templates, see How to Generate Downloadable PDF Documents.

Turn on downloads in the invoice list

  1. Go to Design → Page Builder and open the page that shows invoices.
  2. Select the Settings icon on the List widget that shows the invoice list.
  3. Turn on Template Download.
  4. In Select Template, select your invoice template.
  5. Select Save.
  6. Publish the page.
List widget configuration with Template Download turned on and the invoice template selected in Select Template
List widget configuration with Template Download turned on and the invoice template selected in Select Template
List widget configuration with Template Download turned on and the invoice template selected in Select Template
List widget configuration with Template Download turned on and the invoice template selected in Select Template

You can also offer downloads in a sub-grid on a form, for example invoices on an account detail form. The sub-grid has the same Template Download and Select Template settings. See How to Add Sub-Grids to Portal Forms.

How portal users download an invoice

  1. In the portal, the portal user opens the invoice page, for example Invoice.
  2. The page lists their invoices.
  3. They select Download for the invoice.

The invoice downloads as a PDF file.

Portal invoice list with the Download option shown for an invoice
Portal invoice list with the Download option shown for an invoice
Portal invoice list with the Download option shown for an invoice
Portal invoice list with the Download option shown for an invoice

Note: Template Download creates a document for each record from your template. It is different from Enable Export, which exports the list records as a CSV, Excel or PDF file.

Troubleshooting

The template is missing from Select Template: The template is still a draft. Open it under Template Scripting and select Publish.

The Download option does not appear in the portal: Check that Template Download is on in the List widget, then save and publish the page again.

Portal users don’t see any invoices: Check that their role has View permission on the invoice entity, and that the list shows records related to the portal user.

Did this solve it?No, contact support