Specify a Target Version for Extensions

Documentation article about Specify a Target Version for Extensions

·2 min read·View Oracle Docs

Specify a Target Version for Extensions

Specify a Target Version for Extensions

You should specify version compatibility in your extension to ensure that it can only be installed and activated on a compatible SuiteCommerce website. If the extension is not compatible with the website, it is hidden on the Activate Themes and Extensions page in the NetSuite account. To specify version compatibility, use the target_version key in the extension manifest file.

json
"target_version": {
"SCA": ">=21.2.0",
"SCS": ">=21.2.0"
}

See Edit the Extension Manifest for more information about manifest metadata.

When creating an extension for SuiteCommerce Advanced, you should also check the extensibility API to determine if a component or method is available in a particular version of SCA. In addition, when you instantiate a component, you can verify that it is available by checking its return value. If a component is not available, its return value is null.

javascript
"text-purple-400">var userProfile = container.getComponent('UserProfile');
"text-purple-400">if (userProfile) {
// Component is available
}

--- Context from https://docs.oracle.com/en/cloud/saas/netsuite/ns-online-help/section_1511302363.html --- Your extension's Workspace directory includes a manifest.json file, which includes all the information required to compile resources for the extension.

../Workspace/<EXTENSION_DIRECTORY>/manifest.json

This file is auto-generated when you execute the gulp extension:create command and includes all JavaScript, JSON, SuiteScript, HTML templates, Sass, and assets required to compile and activate your extension.

Manual Edits

This file lists all JavaScript, JSON, SuiteScript, HTML templates, Sass, and assets related to your extension. Although this file is automatically generated, you may need to update it manually if adding Sass entry points for any newly introduced Sass files or changing CCT labels.

Warning:

Potential data loss. Besides compiling and deploying your extension to a local server, the gulp extension:local and gulp extension:deploy commands update the extension's manifest.json file and overwrites any manual changes you made to this file.

To preserve manual changes to manifest.json use the following commands to test your extension locally or deploy to NetSuite:

  • gulp extension:local --preserve-manifest

  • gulp extension:deploy --preserve-manifest

Extension Metadata

The first entries in the manifest file include metadata about the extension itself. These fields are automatically populated when you initially run the gulp extension:create command.

json
1{
2 "name": "MyCoolExtension",
3 "fantasyName": "My Cool Extension!",
4 "vendor": "Acme",
5 "type": "extension",
6 "target": "SCA,SCS",
7 "target_version": {
8 "SCA": "19.2.0",
9 "SCS": "19.2.0"
10 },
11 "version": "1.0.0",
12 "description": "My cool extension does magic!",
13 //...
  • name (string) - uniquely identifies the name of the extension. This field is required. This must be alphanumeric characters without spaces.

  • fantasyName (string) - identifies the label for the extension. This field can include special c

Frequently Asked Questions (4)

How do I specify a target version for SuiteCommerce Advanced extensions?
Specify the target version in the extension's manifest file using the `target_version` key, ensuring it matches the version of the SuiteCommerce website where it will be installed.
What happens if the extension is not compatible with the SuiteCommerce website version?
The extension will be hidden on the Activate Themes and Extensions page in NetSuite, preventing it from being installed or activated.
Is it necessary to manually edit the manifest.json file for specifying version compatibility?
The manifest.json file is auto-generated, but you may need to manually update it if adding SASS entry points or changing CCT labels, especially if preserving manual changes is important.
How can I ensure that a SuiteCommerce Advanced component is available in a particular version?
Check the extensibility API to determine component availability, and verify by checking the return value when you instantiate a component. If the return value is `null`, the component is not available.
Source: Specify a Target Version for Extensions Oracle NetSuite Help Center. This article was generated from official Oracle documentation and enriched with additional context and best practices.

Was this article helpful?

More in General

View all General articles →