N/certificateControl Module

Use the N/certificateControl module to enable scripting access to the Digital Certificates list found in the UI at Setup > Company > Certificates. You can use this module to find, create, update, read and delete certificates records. For more information, see Digital Signing and Uploading Digital Certificates.

                                   

To access the N/certificateControl module, you must use the Execute As Role field on the script deployment record. Select either the Administrator role or a custom role with the Certificate Access permission. For more information, see Access to Digital Certificates.

Important:

The certificate record holds information for a digital certificate, but it is not a standard NetSuite record and cannot be accessed with the N/record.

In This Help Topic

N/certificateControl Module Members

Member Type

Name

Return Type / Value Type

Supported Script Types

Description

Object

certificateControl.Certificate

object

Server scripts

Encapsulates a digital certificate record.

Method

certificateControl.findCertificates(options)

object

Server scripts

Returns metadata about the certificate(s).

certificateControl.findUsages(options)

object[]

Server scripts

Returns an audit trail of how a certificate has been used. Includes operations performed with time stamps.

certificateControl.createCertificate(options)

certificateControl.Certificate

Server scripts

Creates a certificate record using a file from the File Cabinet. After saving with Certificate.save(), the certificate is accessible on the Certificates.

certificateControl.deleteCertificate(options)

string

Server scripts

Deletes a certificate record that has been uploaded to the Certificates list in the UI or created using certificateControl.createCertificate(options) and saved with Certificate.save().

certificateControl.loadCertificate(options)

certificateControl.Certificate

Server scripts

Loads a certificate record that has been uploaded to the Certificates list in the UI or created using certificateControl.createCertificate(options).

certificateControl.lock(options)

string

Server scripts

Locks a certificate record so that it cannot be edited.

certificateControl.unlock(options)

string

Server scripts

Unlocks a certificate record that has been locked with certificateControl.lock(options).

Enum

certificateControl.Operation

enum

Server scripts

Holds the values for the operation when searchng for certificates with certificateControl.findUsages(options).

certificateControl.Operator

enum

Server scripts

Holds string values for search operators to use with the name and description parameters of the certificateControl.findCertificates(options).

certificateControl.Type

enum

Server scripts

-

Certificate Object Members

The following members are called on the certificateControl.Certificate object.

Member Type

Name

Return Type / Value Type

Supported Script Types

Description

Method

Certificate.save()

object containing the script ID of the new certificate record

Server scripts

Saves a certificate record.

Property

Certificate.description

string

Server scripts

Describes the certificate record.

Certificate.file

File Object Members object

Server scripts

Includes the properties of the file uploaded to create the certificate.

Certificate.name

string

Server scripts

The name of the certificate record.

Certificate.monthReminder

boolean

Server scripts

Indicates the setting of the Month box for Expiration Reminders on the certificate record.

Certificate.notifications

number[]

Server scripts

The internal IDs of the employees selected in the Copy Employees field on the certificate record.

Certificate.password

string (write-only)

Server scripts

The password for the digital certificate. You can create a GUID for the password using Form.addSecretKeyField(options) or you can create an API secret for the secret at Setup > Company > API Secrets.

Certificate.restrictions

number[]

Server scripts

The internal IDs of the employees selected in the Restrict to Employees field of the certificate record.

Certificate.scriptId

string

Server scripts

The ID of the certificate record.

Certificate.subsidiaries

number[]

Server scripts

The internal IDs of the subsidiaries associated with the certificate record.

Certificate.threeMonthsReminder

boolean

Server scripts

Indicates the setting of the 3 Months box for Expiration Reminders on the certificate record.

Certificate.weekReminder

boolean

Server scripts

Indicates the setting of the Week box for Expiration Reminders on the certificate record.

Related Topics

Digital Signing
Uploading Digital Certificates
N/https/clientCertificate Module
N/crypto/certificate Module
SuiteScript 2.x Modules
SuiteScript 2.x

General Notices