SignedXml.asString()

Method Description

Returns the signed XML as a string.

Returns

string

Supported Script Types

Server scripts

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

Governance

None

Module

N/crypto/certificate Module

Parent Object

certificate.SignedXml

Sibling Object Members

SignedXml Object Members

Since

2019.1

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

            //Add additional code
...
// signedXml is a certificate.SignedXml object
var signedXml = certificate.signXml({
    algorithm: certificate.HashAlg.SHA256,
    certId: 'custcertificate1',
    rootTag: 'infNFe',
    xmlString: infNFe.getContents()
});

// signed_AsString will be a string
var signed_AsString = signedXml.asString();
...
//Add additional code 

          

Related Topics

General Notices