action.skip

Enabling Draft PDF Generation

← Configuring Draft Editing Options

For review or testing purposes, your business may require that users generate PDF files from multiple invoices in the status Draft.

Setting up this feature involves two tasks:

Creating Draft PDF File Distribution Target

To enable the option for creating PDF files for draft invoices, create a dedicated file distribution target for draft PDF documents:

  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.

    Make sure to select the checkbox Draft Folder. Other mandatory information include the name, backend and PDF name.

    Assume you want to store PDF files for draft invoices in a dedicated library or folder in Salesforce Files:

    Documents
         ↳ Drafts

    Create a setting record like:

    Field Value
    Name Draft invoice PDF
    Active true
    Backend Folder
    Draft Folder true
    Path Documents/Drafts
    PDF Name [AccountName]_Draft_[InvoiceNo].pdf
  5. Click Save.

    Applying this setting will allow storing produced draft PDF files using the specified name pattern in Salesforce Files under Documents/Drafts.

Adding Create Draft PDFs Button

To enable the option for creating PDF files for multiple draft invoices from the invoices list view, add the Create Draft PDFs button to the invoices list view. To do so:

  1. Navigate to the object management settings of the Invoice object.
  2. Click List View Button Layout.
  3. In the List View row, click to open the action menu, then select Edit.
  4. Under Custom Buttons, move Create Draft PDFs to the Selected Buttons column.

    rel_list_prop

  5. Click Save to save the modified page layout.

To enable the option for creating PDF files for multiple draft invoices from the invoice run detail view, add the Create Draft PDFs button to the invoice run detail view. To do so:

  1. Navigate to the object management settings of the Invoice Run object.
  2. Click Page Layouts.
  3. Click Edit in the row of the Invoice Run Layout.
  4. Scroll to the Invoices list and click to open the list properties.
  5. Open the Buttons section.
  6. Under Custom Buttons, move Create Draft PDFs to the Selected Buttons column.

    rel_list_prop

  7. Click OK to save the list properties.

  8. Click Save to save the modified page layout.

    For help about modifying page layouts, see Managing Pages.