Edit the Extension Manifest: CCT

Documentation article about CCT Your extension's Workspace directory includes a manifest.json file, which includes all the information required to compile

·3 min read·View Oracle Docs

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 characters.

  • vendor (string) - identifies the vendor as a string. This field is required.

  • type (string) - indicates the type as an extension. This field is required.

  • target (comma-separated string) - indicates the SuiteCommerce or SCA applications supported by the extension. This field is required.

  • target_version ( array) - indicates the SuiteCommerce or SCA application versions supported by the extension. This field is required.

  • version (string) - indicates the version of the extension, such as 1.0.0. This field is required.

  • description (string) - provides a description of the extension as it appears in NetSuite. This field is optional.

Important:

To take advantage of extension update requirements, version numbers should follow this format, where d is a single digit: dd.dd.dd.

Assets

The assets object defines paths to the images and fonts located in the extension directory's assets folder. This defines an array for each image and font used. These paths are relative to the extension's assets folder path. Extensions treat services as assets. These are created on NetSuite servers when you activate/deploy your extension.

If the extension developer tools detect a file name with the pattern XYZ.ServiceController.js, they create the service (.ss) file and add a reference in the manifest. Later, when you activate the extension, the .ss file deploys to the backend as an asset.

json
1//...
2"assets": {
3 "img": {
4 "files": []
5 },
6 "fonts": {
7 "files": []
8 },
9 "services": {
10 "files": [
11 "services/MyCoolModule.Service.ss",
12 "services/AdditionalCoolModule.Service.ss"
13 ]
14 }
15},
16//...

Configuration

The configuration object defines paths to the JSON files in your extension directory's Configuration folder.

json
1//...
2"configuration": {
3 "files": [
4 "Modules/MyCoolModule/Configuration/MyCoolModule.json",
5 "Modules/AdditionalCoolModule/Configuration/AdditionalCoolModule.json"
6 ]
7},
8//...

Templates

The templates object lists all HTML template files included in the extension by application. The application object includes one object per application (shopping, myaccount, and checkout). Each application lists each file in the files array.

json
1//...
2"templates": {
3 "application": {
4 "shopping": {
5 "files": [
6 "Modules/MyCoolModule/Templates/acme_mycoolextension_mycoolmodule_list.tpl",
7 "Modules/MyCoolModule/Templates/acme_mycoolextension_mycoolmodule_edit.tpl",
8 "Modules/AdditionalCoolModule/Templates/acme_mycoolextension_additionalcoolmodule_list.tpl",
9 "Modules/AdditionalCoolModule/Templates/acme_mycoolextension_additionalcoolmodule_edit.tpl"
10 ]
11 },
12 "myaccount": {
13 "files": [
14 "Modules/MyCoolModule/Templates/acme_mycool

Frequently Asked Questions (4)

What is a CCT in NetSuite?
CCT stands for CMS Content Type, which is an extension component in NetSuite that includes specific information like label, icon, settings record, and registercct_id in the manifest's metadata.
What attributes are required to build a CCT in NetSuite?
To build a CCT in NetSuite, you must include the following required attributes in the `cct` array: `label`, `settings_record`, and `registercct_id`.
What is the purpose of the `registercct_id` attribute in a CCT?
The `registercct_id` attribute lists the Name field of the CMS Content Type Record for your CCT and matches the `id` property in the `registerCustomContentType()` method in your CCT module's entry point JavaScript file.
Is the icon attribute mandatory for setting up a CCT?
No, the icon attribute is not mandatory for setting up a CCT. It is optional and lists the path of the icon to be displayed in SMT for the CCT.
Source: CCT 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 →