Skip to main content
Skip table of contents

createRequests

This method is used to create multiple DocuFetch Requests. Items will need to be added using createRequestItem or createRequestItems.

Returns: List of created DocuFetchRequestInfo objects.

List<cg.DocuFetchRequestInfo> createRequests (List<cg.DocuFetchRequestInfo> requestInfoList)

JAVA
Id sampleParentId = '001XXXXXXXXXXXXXXX'; // e.g. Account or Case ID
List<cg.DocuFetchRequestInfo> requestList = new List<cg.DocuFetchRequestInfo>();
for(Integer i=0; i<10; i++){
    cg.DocuFetchRequestInfo requestInfo = new cg.DocuFetchRequestInfo();
    requestInfo.name = 'Mortgage Application ' + i;
    requestInfo.description = 'By Tools API ' + i;
    requestInfo.parentId = sampleParentId;
    requestInfo.relationshipName = 'cg__Account__r';
    requestInfo.fileObjectName = 'AccountFile__c';
    requestInfo.fileObjectPrefix = 'cg__';
    requestInfo.type = 'request';
    requestList.add(requestInfo);
}
List<cg.DocuFetchRequestInfo> createdRequests = cg.DocuFetchTools.createRequests(requestList);
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.