Skip to content

How to attach a related invoice PDF to a source record?

Depending on your specific org setup, possible license restrictions or other reasons, you may have to attach produced invoice PDF files to the related source records, like opportunities, contracts, etc.

To do so, proceed as follows:

  1. Create an ID field on the invoice that points to the source object.

    If you generate invoices from opportunities, for example, you can create a Lookup field with the API name ON_Opportunity__c that points to Opportunity.

    For help about creating fields, see Managing Object Fields.

  2. Create a new File Distribution custom setting, providing the API name of the ID field as the Backend value.

    For help about creating File Distribution settings, see File Distribution.

  3. Create and finalize an invoice for the source record, or regenerate the PDF copy of an existing invoice.

    JustOn now attaches the PDF copy of the invoice to the source record, accessible in the Notes & Attachments section.