Key Object Members of keyControl in SuiteScript
The keyControl module in SuiteScript provides essential member properties and methods for managing keys within NetSuite scripts.
The keyControl module in SuiteScript provides developers with mechanisms to create and manage keys programmatically. This article outlines the key object members available and their specific descriptions, return types, and supported script types.
What Are Key Object Members?
Key object members are properties and methods associated with the keyControl.Key object in SuiteScript. These members allow you to interact with keys used within NetSuite servers.
Key Object Members Overview
The following table summarizes the key object members, their types, and descriptions:
| Member Name | Type | Description | Supported Script Types |
|---|---|---|---|
Key.file | file.File | Represents the file object of the key. | Server scripts |
Key.password | string | Contains the password for the key (write-only). | Server scripts |
Key.scriptId | string | Script ID of the key, prefixed with custkey. | Server scripts |
Key.name | string | Name of the key. | Server scripts |
Key.description | string | Description associated with the key. | Server scripts |
Key.restrictions | string | Internal IDs of the employees restricted to this key. | Server scripts |
Methods
The method available for this object is:
Key.save(): This method is used to save the key. Its return type is an object.
Example Usage
To create and modify a key using the keyControl module, you might use the following code snippet:
1// Add additional code2...3var key = keyControl.createKey();4key.file = file.load(422); // ID of the file containing the private key (id_ecdsa or id_rsa)5...6// Add additional codeConclusion
The keyControl module plays a crucial role in securely managing keys within SuiteScripts. By familiarizing yourself with the key object members, you can effectively utilize keys to enhance your integration scripts.
Source: This article is based on Oracle's official NetSuite documentation.
Key Takeaways
- The
keyControl.Keyobject allows for management of keys in SuiteScript. - Key members include file, password, script ID, and restrictions.
- The
Key.save()method is crucial for saving changes to the key.
Frequently Asked Questions (4)
What script types are supported by the keyControl module in SuiteScript?
Can the password for a key in the keyControl module be read programmatically?
What information does the Key.restrictions property provide?
How do you save changes to a key using the keyControl module?
Was this article helpful?
More in General
- Payment Date Prediction Feature in NetSuite
Payment Date Prediction in NetSuite utilizes machine learning to enhance financial planning by predicting invoice payment dates.
- NetSuite Ship Central Enhancements for Packing & Shipping
NetSuite Ship Central features enhance packing and shipping operations for improved efficiency and accuracy.
- Generative AI Features in NetSuite 2026.1
Discover new generative AI features in NetSuite 2026.1, enhancing reporting, search, predictions, and development productivity.
- Field Service Management Enhancements and Bug Fixes for 2026
Overview of the 2026 Field Service Management SuiteApp updates showcasing enhancements and bug fixes.
Advertising
Reach General Professionals
Put your product in front of NetSuite experts who work with General every day.
Sponsor This Category