...
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
let attach = new SimpleAttachment(); attach.deleteAttachment('157052637119478714'); |
...
getContent(SimpleRecord sysAttachment)
This method gets attachment content as a string.
Name | Type | Mandatory | Default Value |
---|---|---|---|
sysAttachment | SimpleRecord | Y | N |
Return:
Type | Description |
---|---|
String | The attachment content as a string. |
rename(attachmentId,fileName)
This method renames the specified attachment.
...
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
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.
Name | Type | Mandatory | Default Value |
---|---|---|---|
record | SimpleRecord | Y | N |
filename | String | Y | N |
contentType | String | Y | N |
content | String | Y | N |