Skip to main content


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

deleteMessage(messageID, isReply, replyID, c11nEnv)

Updated on July 20, 2021

Deletes a message from a given context.

Returns

Not applicable.

Parameters

NameTypeDescriptionRequired
messageIDstringThe ID of the message that needs to be deleted.
isReplybooleanThe flag that determines if you want to delete a message or a reply to a message.
Note:
  • The default value is false.
  • Set isReply to true if you want to delete a reply to a message.
  • Set isReply to false if you want to delete a message.
replyIDstringThe ID of the reply that needs to be deleted.
Note:
  • This parameter is required if isReply is set to true.
  • If isReply is set to false, pass an empty string as the replyID.
c11nEnvobjectThe name of the context where the API is being called.

Usage example

In this example, the API removes the reply whose ID is R-101 from a message whose ID is W-102.

PCore.getFeedUtils().deleteMessage('W-102', true, 'R-101', 'app/primary_1')
.then(() => {
   // success
}).catch(err => {
  // errors
});
  • Previous topic APIs in the FeedUtils class
  • Next topic getFeeds(pulseContext, feedID, feedClass, feedFilters, fetchFeedsCancelTokenSource, c11nEnv, isLoadMore)

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