SecureString.appendSecureString(options)

Method Description

Appends one https.SecureString to another https.SecureString.

Returns

A converted https.SecureString (not a new SecureString).

Supported Script Types

Server scripts

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

Governance

None

Module

N/https Module

Since

2015.2

Parameters
Note:

The options parameter is a JavaScript object.

Parameter

Type

Required / Optional

Description

options.secureString

https.SecureString

required

The https.SecureString to append.

options.keepEncoding

boolean

optional

Keeps the appended string in its original encoding. Set this value to true to prevent unexpected content re-encoding.

The default value is false.

Errors

Error Code

Thrown If

FAILED_TO_CONVERT_BINARY_DATA_TO_UTF_8

The options.keepEncoding parameter is set to false and an invalid attempt to re-encode from binary to string data occurred during the append.

FAILED_TO_DECODE_STRING_ENCODED_BINARY_DATA_USING_1_ENCODING

The options.keepEncoding parameter is set to false and an invalid attempt to re-encode from string to binary data occurred during the append.

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/https Module Script Samples.

          // Add additional code 
...
var secureString1 = https.createSecureString({
    input: "myString1"
});

var secureString2 = https.createSecureString({
    input: "myString2"
});
secureString1.appendSecureString({
    secureString: secureString2,
    keepEncoding: true
}); 
// secureString1 will now be "myString1myString2"
...
// Add additional code 

        

Related Topics

General Notices