Skip to content

How to improve the performance of the continuous invoice run with large data sets?

The batch process for the continuous invoice run (BatchTransactionalInvoiceRun) may fail on large data sets (more than 1.000.000 records in the table) with a query timeout exception due to a full table scan.

To solve this:

  1. Open a support case with Salesforce to get the field ON_Date__c indexed.
  2. Edit the filter and change the use case from Continuous to Continuous Daily.

    This will change the execution of the continuous invoice run to start a batch process on each day of the invoice run period. Instead of one batch process, the system will execute 31 batch processes per month.


This solution only works if the Salesforce query optimizer choses the ON_Date__c index over a full table scan. So the maximum number of unconverted records may not exceed 333.333 per day.


The filter use case Continuous Daily is ignored when creating a new invoice from a subscription.