Message.toMessageData()
The content in this help topic pertains to SuiteScript 2.1.
Method Description |
Converts a pgp.Message object to message data without any processing. This method only works if the message is not encrypted. |
Returns |
|
Supported Script Types |
Server scripts For more information, see SuiteScript 2.x Script Types. |
Governance |
None |
Module |
|
Parent Object |
|
Sibling Module Members |
|
Since |
2022.2 |
Errors
Error Code |
Thrown If |
---|---|
PGP_EXPECTED_UNENCRYPTED_MESSAGE |
The message is encrypted. |
Syntax
The following code sample shows the syntax for this member. It is not a functional example. For a complete script example, see N/pgp Module Script Samples.
// Add additional code
...
const message = msgData.toMessage() // creates Message object
message.toMessageData()
...
// Add additional code