Enabling Automatic Finalization on Invoice Run
← Setting Up Invoice Finalization
Your organization's business may require to finalize draft invoices automatically during an invoice run when certain conditions become true.
To be able to control the automatic finalization of invoices, you add the checkbox AutoFinalize
to the Invoice object. You can then apply custom logic to have this checkbox set selectively on specific records or globally on all produced records using a formula, the ON field mechanism or a Salesforce Flow.
Info
This approach differs from the finalization via flow: JustOn will only execute this operation during an invoice run, without respect to any other conditions.
To add the checkbox:
- Navigate to the fields list of the Invoice object.
-
Create the following new field.
API Name Data Type Description AutoFinalize Formula (Checkbox)
CheckboxWhen selected, the FinalizeInvoiceChain will run for this invoice. For help about creating fields, see Managing Object Fields.
If you use a custom
INVOICERUN
batch chain, make sure to include theAutoFinalizeBatchHelper
batch for this function to work.