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:
- 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
Lookupfield with the API name
ON_Opportunity__cthat points to
For help about creating fields, see Managing Object Fields.
- Create a new File Distribution custom setting, providing the API name of the ID field as the
For help about creating File Distribution settings, see File Distribution.
- 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.