Skip to main content


         This documentation site is for previous versions. Visit our new documentation site for current releases.      
 

deleteDocument(caseID, documentID, context)

Updated on July 20, 2021

Deletes a document from the case to which it is linked.

Returns

A Promise that deletes a document from the case to which it is linked.

Parameters

NameTypeDescriptionRequired
caseIDstringThe ID of the case linked to the document that must be deleted.
documentIDstringThe ID of the document that must be deleted.
contextstringThe name of the context where the API is being called.

Usage example

In this example, the API deletes the document whose ID is 123445 from the case whose ID is C-1.

PCore.getAttachmentUtils().deleteDocument('C-1', '123445', 'app/primary_1')
.then(() => {
   // success
}).catch(err => {
  // errors
});

Have a question? Get answers now.

Visit the Support Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega.com is not optimized for Internet Explorer. For the optimal experience, please use:

Close Deprecation Notice
Contact us