Message.toMessageData()

Note:

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

pgp.MessageData

Supported Script Types

Server scripts

For more information, see SuiteScript 2.x Script Types.

Governance

None

Module

N/pgp Module

Parent Object

pgp.Message

Sibling Module Members

Message Object Members

Since

2022.2

Errors

Error Code

Thrown If

PGP_EXPECTED_UNENCRYPTED_MESSAGE

The message is encrypted.

Syntax

Important:

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 

          

Related Topics

General Notices