getAttachmentById
Gets and attachment by its unique id.
Parameters
Example Usages
app.getAttachmentById(1234);let allAttachmentsForThisRecord = app.getAttachmentsForCurrentRecord();
let invoices = allAttachmentsForThisRecord.filter((singleAttachment) => {
return singleAttachment.documentTypeId == 2;
}); //We assume, that there is just one invoice
let attachmentBlob = app.getAttachmentById(invoices[0].id);
app.printBlob(attachmentBlob);Return Values
Last updated