Edit the Extension Manifest: Assets

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

·3 min read·3 views·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)

How are assets paths defined in a NetSuite extension?
Assets paths in a NetSuite extension are defined relative to the extension's assets folder path. This includes paths for images, fonts, and services used within the extension.
What happens when an extension developer tool detects a file name with the pattern XYZ.ServiceController.js?
When an extension developer tool detects a file name with the pattern XYZ.ServiceController.js, it creates the corresponding service (.ss) file. This file is then referenced in the manifest and deployed as an asset when the extension is activated.
Are services considered assets in NetSuite extensions?
Yes, services are considered assets in NetSuite extensions. They are created on NetSuite servers when you activate or deploy your extension.
Where are services deployed after activating a NetSuite extension?
Services are deployed to the backend as an asset after you activate a NetSuite extension.
Source: Assets 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 →