You are here:
copyAttachmentAsync()
This Framework function is used to copy the file and the related thumbnails.
Required Editions
| Available in Lightning Experience in Professional, Unlimited, and Enterprise Editions that have Consumer Goods Cloud enabled. |
Parameters
-
srcBlobPkey: is the Pkey of the source from where the attachment is copied. The value of the parameter should be a non-empty string. -
destBlobPkey: is the Pkey of the destination to which the attachment is copied. The value of the parameter should be a non-empty string. -
tableName: table in which the Pkey would be used. The value of the parameter should be a non-empty string.
Returns
-
result(promise): The API returns a promise.The fulfilled promise contains the result. If invalid input parameters are given, the promise is rejected.
Example
var srcPkey = "00100000003ifwfs",
destPkey = "fs1000fw00i31100",
tableName = "BpaAttachment";
Facade.copyAttachmentAsync(srcPkey , destPkey, tableName).then(
function (info) {
// info is an object containing the following properties -
// info.width = 100
// info.height = 200
// info.path = "BpaAttachmentBlob/fs1000fw00i31100.png"
console.log("copy file success:" + JSON.stringify(info));
},
function (error) {
console.log("copy file failure:" + JSON.stringify(error));
});Did this article solve your issue?
Let us know so we can improve!

