postMessage(pulseContext, message, attachmentIDs, isReply, c11nEnv)
Posts a message to the given context.
Returns
A Promise that resolves to an object.
Parameters
Name | Type | Description | Required |
pulseContext | string | The name of the application context or case context for which the message must be posted. | ✅ |
message | string | The message that needs to be posted. | ✅ |
attachmentIDs | array | The metadata of the attachments that need to be posted along with the message. | ❌ |
isReply | boolean | The flag that determines if you want to post a message or a reply to a message. | ❌ |
c11nEnv | object | The name of the context where the API is being called. | ✅ |
Usage example
In this example, the API posts a message along with attachment to the given context.
PCore.getFeedUtils().postMessage('DATA-PORTAL','test message', [{"type":"File","category":"File","fileName":"attachment.png","ID":"459c"}], false, 'app/primary_1')
.then(() => {
// success
}).catch(err => {
// Error handling
});
Previous topic likeMessage(param) Next topic APIs in the FormUtils class