You are viewing an old version of this page. View the current version.
Compare with Current View Page History
« Previous Version 14 Next »
This server class provides methods that allow operating with attachments.
Instantiates a new empty SimpleAttachment object.
let attach = new SimpleAttachment();
This method copies attachments from the source record to the target record.
Parameter(s):
Return:
Example:
let attach = new SimpleAttachment(); attach.copy('user', '155964310500000059', 'sys_script', '155964310500000051');
This method deletes the specified attachment.
let attach = new SimpleAttachment(); attach.deleteAttachment('157052637119478714');
This method gets attachment content as a string.
Example)
let attach = new SimpleAttachment(); let content = attach.getContent('157052637119478714');
This method renames the specified attachment.
let attach = new SimpleAttachment(); attach.rename('157052637119478714', 'new_name_1.png');
This method inserts the attachment to the record specified.
Return
let attach = new SimpleAttachment(); let record = attach.write('157052637119478714', 'readme.md', 'text/markdown', '# h1 title');