Note: This release is in preview. Features described here don’t become generally available until the latest general availability date that Salesforce announces for this release. Before then, and where features are noted as beta, pilot, or developer preview, we can’t guarantee general availability within any particular time frame or at all. Make your purchase decisions only on the basis of generally available products and features.
OptimizationFiles Class
Namespace
OptimizationFiles Methods
FetchOptimizationFiles(fetchFilesInput)
API Version
66.0
Requires Chatter
No
Signature
public static ConnectApi.FetchFilesOutputRepresentation FetchOptimizationFiles(ConnectApi.fetchFilesInput fetchFilesInput)
Parameters
- fetchFilesInput
- Type: ConnectApi.fetchFilesInput
- The input representation containing the ID of the optimization request for which to retrieve the associated files.
Return Value
Usage
Use FetchOptimizationFiles to retrieve the Content Version files produced for a completed optimization request. Each file in the response corresponds to a file created in the org and is keyed by filename in the returned map.
Example
1ConnectApi.fetchFilesInput input = new ConnectApi.fetchFilesInput();
2 input.optimizationRequestId = '0XxXXXXXXXXXXXXX';
3
4 ConnectApi.FetchFilesOutputRepresentation output =
5 ConnectApi.OptimizationFiles.FetchOptimizationFiles(input);
6
7 Map<String, ConnectApi.CreatedFile> files = output.createdFiles;
8
9 for (String fileName : files.keySet()) {
10 ConnectApi.CreatedFile file = files.get(fileName);
11 System.debug(fileName + ': id=' + file.contentVersionId + ', success=' + file.success);
12 }