For the complete documentation index, see llms.txt. This page is also available as Markdown.

SDK Quick Testing

This article is intended to share quick examples to test from the developer’s console.

S-Docs

Combine All Documents

SDOC__SDTemplate__c template = [SELECT Id FROM SDOC__SDTemplate__c WHERE Name = 'Opportunity Template'];
Set<Id> templates = new Set<Id>{
    template.Id
};
List<Opportunity> opps = [SELECT Id FROM Opportunity LIMIT 20];
List<Id> objs = new List<Id>();
for (Opportunity opp : opps) {
    objs.add(opp.Id);
}
SDOC.CombinedDocumentHandler handler = new SDOC.CombinedDocumentHandler();
handler.fileName = 'YOUR_FILE_NAME'; // No extension
List<SDOC.BatchAction> handlers = new List<SDOC.BatchAction>{
    handler
};
Id asyncId = SDOC.DocumentSDK.generateDocsInBatch(objs, templates, 2, handlers);

S-Sign

Last updated

Was this helpful?