certificateControl.createCertificate(options)
Method Description |
Creates a certificate record on the Certificates page using a file from the File Cabinet.
Note:
Your role must have Create, Edit, or Full access to the Certificate Access permission to create certificates using SuiteScript. |
Returns |
|
Supported Script Types |
Server scripts For more information, see SuiteScript 2.x Script Types. |
Governance |
10 units |
Module |
|
Since |
2019.2 |
Parameters
The options
parameter is a JavaScript object.
Parameter |
Type |
Required / Optional |
Description |
Since |
---|---|---|---|---|
|
file |
required |
A File Object Members object. The file must already be uploaded to the File Cabinet. |
2019.2 |
|
string |
optional |
If applicable, the password associated with your digital certificate. The script ID of an API secret can be accepted. For more information, see Secrets Management. |
2019.2 |
|
string |
optional |
The desired script ID of the certificate record. The script ID is automatically prefixed with |
2019.2 |
|
string |
optional |
The description of the certificate record. |
2019.2 |
|
number[] or string[] |
optional |
The internal ID of subsidiaries associated with the certificate in either number or string format. |
2019.2 |
|
number[] or string[] |
optional |
The internal ID of employees selected in the Restricted to Employees field for a certificate. You can enter the internal ID in either number or string format. |
2019.2 |
|
number[] or string[] |
optional |
The internal ID of employees selected in the Copy Employees field on the certificate record. You can enter the internal ID in either number or string format. |
2019.2 |
|
string |
required |
The name of the certificate record. |
2019.2 |
|
boolean |
optional |
The setting for the Expiration Reminder : Week checkbox. |
2019.2 |
|
boolean |
optional |
The setting for the Expiration Reminder : Month checkbox. |
2019.2 |
|
boolean |
optional |
The setting for the Expiration Reminder : 3 Months checkbox. |
2019.2 |
Syntax
The following code sample shows the syntax for this member. It is not a functional example. For a complete script example, see N/certificateControl Module Script Samples.
//Add additional code
...
var fileObj = file.load({
id: 'SuiteScripts/dsa.p12'
});
var options = {
file : fileObj,
password : '022b490ad4334c7e86a8304f937ec68f',
name : 'testCert',
description : 'testDescription',
scriptId : '_testid',
subsidiaries : [1,3],
weekReminder : false,
monthReminder : true,
threeMonthsReminder : false
};
var newCertificate = cc.createCertificate(options);
newCertificate.save();
...
//Add additional code