Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagejs
themeEclipse
titledeleteAttachment
let attach = new SimpleAttachment();
attach.deleteAttachment('157052637119478714');

...

getContent(SimpleRecord sysAttachment)

This method gets attachment content as a string.

NameTypeMandatoryDefault Value
sysAttachmentSimpleRecordYN


Return:

TypeDescription
StringThe attachment content as a string.

rename(attachmentId,fileName)

This method renames the specified attachment.

...

Code Block
languagejs
themeEclipse
titlerename
let attach = new SimpleAttachment();
attach.rename('157052637119478714', 'new_name_1.png');


write(SimpleRecord record, String fileName, String contentType, String content)

This method inserts the attachment to the record specified.

NameTypeMandatoryDefault Value
recordSimpleRecordYN
filenameStringYN
contentTypeStringYN
contentStringYN