getPreviewURL
This method is used to get the URL of an S-Drive Attachment's Preview File.
String getPreviewURL(String parentId, String fileObjectId,
Long timeValue)
Parameters:
parentId:Â Id of the parent object. You can use 15-character id or 18-character id.
fileObjectId:Â Id of the attachment (file) object. This can be retrieved using an SOQL query.
timeValue:Â Expiration time of the link in seconds.
Return Value:Â The method will return the URL of the S-Drive attachment' preview.
If you would like to get preview URL of an old version of a file, you should add id of an old version file into fileoObjectIds list.