action.skip

Linking Files With Account

← Controlling File Distribution

Assume your business wants to set up the account as the file distribution target – that is, you want the produced file to be linked from the corresponding account.

To this end, you create a dedicated File Distribution setting that specifies Account in the field Backend (which defines the distribution target).

To create the File Distribution setting:

  1. Click to enter Setup, then open Custom Settings.

    In Salesforce Lightning, navigate to Custom Code > Custom Settings.

    In Salesforce Classic, navigate to Develop > Custom Settings.

  2. Click Manage in the row of File Distribution.

  3. Click New.
  4. Specify the details as necessary.

    The mandatory information for defining a distribution target include the name, the backend and the activation marker.

    Assuming you want to link the account with the produced files, keeping the default naming scheme, create this setting record:

    Field Value
    Backend Account
    Name Account
    Active true

    file_dist_account

  5. Click Save.

    Applying this setting will produce PDF files using the default name pattern (like [InvoiceDate]_[InvoiceNo]_[AccountName].pdf) and adds a link to the Salesforce file from the corresponding account record.

Backend concepts

Generally, the File Distribution field Backend specifies the file distribution target.

Targets can be

  • target records in your Salesforce org (Invoice or Account) that will be linked with the produced PDF files
  • cloud storage services (GoogleDrive or AmazonS3) for storing produced documents
  • existing libraries and folders in Salesforce Files

As a specific backend use case, you can define the API name of an ID field (master-detail, lookup, formula) on the invoice that links to a specific object, for example, ON_Opportunity__c or ON_Contract__c. On PDF generation, JustOn links the file with the record referred to by the ID.