action.skip

How to create a new transaction table?

← PDF and Email FAQ

When billing usage data, you can configure JustOn to attach transaction tables to the invoice, either

In certain cases (like layout errors, text typos etc.) you may have to regenerate the transaction table for open invoices. Depending on whether you print the table to the PDF or attach a CSV to the invoice, the steps to do so differ.

Recreating Invoice Transaction Table

Note

Make sure that the checkbox field ON_AddToTransactionTable on the source object is selected.

  1. Open the invoice for which you want to create a new transaction table.
  2. In the Notes & Attachments section, delete the attached transaction table.

    This is not necessary with draft invoices.

  3. Open an appropriate invoice list view.

  4. In the invoice list, select the checkbox next to the invoice for which you want to create a new transaction table.
  5. On top of the invoice list, click to open the list view actions, then select Rebuild Transaction Tables.
  6. Open the invoice for which you want to create a new transaction table.
  7. Click Recreate PDF, then click Continue to confirm and complete the operation.

    This creates a new version of the PDF file, which includes the new transaction table.

    This is not necessary with draft invoices.

Recreating Transaction CSV Attachment

Note

Make sure that the checkbox field ON_AddToCsv on the source object is selected.

  1. Open the invoice for which you want to create a new transaction CSV file.
  2. In the Notes & Attachments section, delete the attached transaction CSV.
  3. Open an appropriate invoice list view.
  4. In the invoice list, select the checkbox next to the invoice for which you want to create a new transaction CSV file.
  5. Click to open the action menu, then select Finalize.

    This repeats the batch finalization for the selected invoice, which involves creating a new transaction CSV file.

Recreating transaction CSV using Apex

Instead of rerunning the invoice finalization, you can use Apex to recreate transaction CSV files. In the Execute Anonymous Apex tool of the Developer Console, execute the following code, applying your details:

Set<Id> invoiceIds = new Map<Id, sObject>([SELECT Id FROM ONB2__Invoice__c WHERE <invoice condition>]).keySet();

new ONB2.ChainRunner().execute(
        new ONB2.ChainFactory().getForBatchNames(new List<String>{'TransactionCsvBatchRenderHelper'})
        .setParameters(
                new Map<String, Object>{'invoiceIds' => invoiceIds}
        )
);

This creates new transaction CSV files for the selected invoices.