certificateControl.lock(options)
Method Description |
Locks a certificate record that has been uploaded to the Certificates list in the UI or created using certificateControl.createCertificate(options). Locked certificates cannot be edited until they are unlocked with certificateControl.unlock(options). |
Returns |
void |
Supported Script Types |
Server scripts For more information, see SuiteScript 2.x Script Types. |
Governance |
10 units |
Module |
|
Since |
2021.1 |
Parameters
The options
parameter is a JavaScript object.
Parameter |
Type |
Required / Optional |
Description |
---|---|---|---|
|
string |
required |
The script ID or internal ID for the certificate you want to lock. You can view the ID of a certificate from the Digital Certificates list at Setup > Company > Certificates. |
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
...
//load the certificate record object
var loadedCertificate = certificateControl.loadCertificate({
scriptId : 'custcertificate_testid'
});
//lock the certificate
loadedCertificate.lock({
id: 'custcertificate_testid'
});
///save the certificate
loadedCertificate.save();
...
// Add additional code