editAttachment(attachmentID, attachmentMetaData, context)
Edits an attachment.
Returns
A Promise that when resolved successfully edits the attachment.
Parameters
Name | Type | Description | Required |
attachmentID | string | The ID of the attachment that needs to be edited. | ✅ |
attachmentMetaData | object | The name and category of the attachment. | ✅ |
context | string | The name of the context where the API is being called. | ✅ |
Usage example
In this example, the API edits the name and category of the attachment whose ID is
123445
.
PCore.getAttachmentUtils().editAttachment('123445',{ name: 'Updated_Name', category:'New_Category' }, 'app/primary_1')
.then(() => {
// success
}).catch(err => {
// errors
});
Previous topic downloadDocument(documentID, context) Next topic getAttachmentCategories(caseID, type, context)