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.
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 |
object |
Server scripts |
Encapsulates a digital certificate record. |
|
Method |
object |
Server scripts |
Returns metadata about the certificate(s). |
|
object[] |
Server scripts |
Returns an audit trail of how a certificate has been used. Includes operations performed with time stamps. |
||
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. |
|||
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(). |
||
Server scripts |
Loads a certificate record that has been uploaded to the Certificates list in the UI or created using certificateControl.createCertificate(options). |
|||
string |
Server scripts |
Locks a certificate record so that it cannot be edited. |
||
string |
Server scripts |
Unlocks a certificate record that has been locked with certificateControl.lock(options). |
||
Enum |
enum |
Server scripts |
Holds the values for the operation when searchng for certificates with certificateControl.findUsages(options). |
|
enum |
Server scripts |
Holds string values for search operators to use with the |
||
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 |
object containing the script ID of the new certificate record |
Server scripts |
Saves a certificate record. |
|
Property |
string |
Server scripts |
Describes the certificate record. |
|
File Object Members object |
Server scripts |
Includes the properties of the file uploaded to create the certificate. |
||
string |
Server scripts |
The name of the certificate record. |
||
boolean |
Server scripts |
Indicates the setting of the Month box for Expiration Reminders on the certificate record. |
||
number[] |
Server scripts |
The internal IDs of the employees selected in the Copy Employees field on the certificate record. |
||
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. |
||
number[] |
Server scripts |
The internal IDs of the employees selected in the Restrict to Employees field of the certificate record. |
||
string |
Server scripts |
The ID of the certificate record. |
||
number[] |
Server scripts |
The internal IDs of the subsidiaries associated with the certificate record. |
||
boolean |
Server scripts |
Indicates the setting of the 3 Months box for Expiration Reminders on the certificate record. |
||
boolean |
Server scripts |
Indicates the setting of the Week box for Expiration Reminders on the certificate record. |