...
This returns void if the delete is successful and an exception if unsuccessful.
Example code:List awsLocationList = new List();
List versionIdList = new List();
Code Block |
---|
List<cg__CaseFile__c> caseFiles = Database.query('Select id, cg__Key__c, cg__Version_Id__c from cg__CaseFile__c'); List<String> awsLocationList = new List<String>(); List<String> versionIdList = new List<String>(); for(cg__CaseFile__c caseFile : caseFiles) { |
...
awsLocationList.add(caseFile.cg__Key__c); |
...
versionIdList.add(caseFile.cg__version_id__c); |
...
} |
...
cg.SdriveTools.deleteS3Files( awsLocationList, versionIdList); |
...
//After delete from s3 is successful you should delete the records Salsforce as well like below. |
...
delete caseFiles. |