Batching & Combining Documents
PreviousAutomation: Triggering the SDK via Platform EventsNextGuest User & Experience Cloud Configuration
Last updated
Was this helpful?
Was this helpful?
// Define the merge logic
SDOC.CombinedDocumentHandler myHandler = new SDOC.CombinedDocumentHandler();
myHandler.fileName = 'Monthly_Invoices_Batch_' + Date.today().format(); // No extension// Prepare the action list
List<SDOC.BatchAction> actions = new List<SDOC.BatchAction>{ myHandler };
// Execute: (Record IDs, Template IDs, Batch Size, Actions)
Id jobId = SDOC.DocumentSDK.generateDocsInBatch(
accountIds,
new Set<Id>{'00Xxxxxxxxxxxxx'},
5,
actions
);