action.skip

How to control the file output?

← Salesforce Environment FAQ ← PDF and Email FAQ

As of JustOn 2.49, Salesforce Files is the default target location for storing

  • produced PDF files for finalized invoices, dunning reminders and account statements,
  • exported invoice and bookkeeping data CSV files, and
  • exported SEPA XML files.

By default, the produced files are accessible on Salesforce's Files tab in the group Owned by me. Depending on your business requirements, you can configure other file distribution targets, like cloud storage services or specific libraries and folders in Salesforce Files. For details, see File Distribution.

Controlling File Output

JustOn Billing & Invoice Management uses the custom settings Export Settings and File Distribution to control the output of produced documents. It may be hard to tell which to apply. Remember that the two settings impact different aspects:

  • Export Settings records control what to export – invoice and bookkeeping data CSV files or SEPA XML files.
  • File Distribution settings control the output location of any produced files, be it PDF files for finalized invoices, dunning reminders and account statements, or exported CSV and XML files.

That is, your use cases determine which settings to use:

File export

If you export data to CSV files for accounting systems or to SEPA XML bank transfer orders, you need appropriate Export Settings records.

jo_faq_files_export
Exporting files (applying Export Settings) to the default location

File location

If you want produced PDF files for finalized invoices, dunning reminders and account statements to be output in a specific location (other than the group Owned by me in Salesforce Files), you need a corresponding File Distribution setting.

jo_faq_files_filedist
Defining a specific output location using a File Distribution setting

File export and file location

If you export data to CSV files for accounting systems or to SEPA XML bank transfer orders, you need appropriate Export Settings records. If you want the exported files to be output in a specific location, you need, in addition, a corresponding File Distribution setting.

To combine the two settings, the Name of the file distribution record must be specified as the Target in the export settings record.

jo_faq_files_export+filedist
Exporting files (applying Export Settings) to a specific location (applying File Distribution)

Additional File Access Options

For generated invoices, dunning reminders or account statements, JustOn copies a link to the PDF file to the corresponding record.

In addition, JustOn can generate public links to the produced PDF files. This allows you to share the documents with any users, including outside your organization, without password protection or any other restrictions.

For generating public links, the Salesforce features Content Deliveries and Public Links must be enabled. For details, see Set Up Content Deliveries in the Salesforce Help. One of the three conditions must also be met:

  • An internal payment provider is set up and active,
  • The (legacy) JustOn Self-Service Extension is installed, or
  • The global setting Always Create Content Distribution is enabled.

For further integrations with external systems like customer portals, etc., you can make JustOn write a public PDF preview link or a public PDF download link to the invoice record upon finalization. To this end, create the corresponding custom field on the Invoice object:

API Name Data Type Description
ContentDistributionUrl URL Specifies the public link to the PDF preview.
Make sure to grant edit access for all users who finalize invoices.
ContentDownloadUrl URL Specifies the public link to the PDF file.
Make sure to grant edit access for all users who finalize invoices.

Note

When trying to access Salesforce Files, users may get a ContentWorkspaceDoc error. To avoid this error and allow for the intended operation, make sure that

  • Salesforce CRM Content is enabled for your org
  • The user is set up as a Salesforce CRM Content User

For details, see How to avoid ContentWorkspaceDoc errors?.

Related information:

JustOn 2.49 Release Notes
File Distribution
Export Settings
Setting Up Public Link Generation
Global Settings