Editing Extension Manifest in NetSuite

Understand how to edit the extension manifest for optimal resource compilation.

·2 min read·View Oracle Docs

The extension manifest in NetSuite is crucial as it contains necessary information to compile extension resources effectively. Making manual edits to this file is often required when you need to update or introduce new components, such as JavaScript, HTML templates, and Sass files.

What Is the Extension Manifest in NetSuite?

The manifest.json file in your extension's Workspace directory encapsulates all essential resources, including JavaScript, JSON, SuiteScript, HTML templates, Sass, and other assets. Generated automatically via the gulp extension:create command, this file assembles everything required to compile and activate your extension.

Important: Use gulp extension:local --preserve-manifest or gulp extension:deploy --preserve-manifest to avoid overwriting manual changes during testing or deployment.

Key Components of the Manifest File

Metadata

The manifest begins with metadata about the extension, like its name, vendor, and target versions. Properly defining these fields is crucial since they describe the fundamental nature and compatibility of your extension:

  • name: Unique extension identifier (without spaces).
  • fantasyName: Display label with special characters allowed.
  • vendor: Identifies the extension vendor.
  • target: Supported SuiteCommerce or SCA applications.
  • target_version: Versions of the applications supported.
  • version: Extension version in format dd.dd.dd.
  • description: Optional description visible in NetSuite.

Assets

Define paths for image, font, and service assets. The system treats detected service files as assets, automatically deploying them to the backend when activated.

JavaScript

Declare JavaScript file paths for each application entry point. This includes defining comprehensive lists of files needed for applications like shopping, myaccount, and checkout.

Sass

List all Sass files and entry points. Proper ordering is critical, especially when dependencies affect the rendering sequence.

Who This Affects

  • Developers: Need to ensure all resources are correctly listed and paths are maintained.
  • Administrators: Must manage deployment settings and manual file integrity.
  • Customization Teams: Handle unique naming conventions and integration specifics.

Key Takeaways

  • Ensure manifest.json accurately reflects the extension's resources.
  • Use --preserve-manifest to protect manual changes from being overwritten during deployments.
  • Verify the correct order and dependency resolution in Sass and JavaScript file listings.

Frequently Asked Questions (4)

How do I specify the JavaScript entry points for different applications in NetSuite?
You specify JavaScript entry points by declaring them under the 'entry_points' object within the 'javascript' object, assigning the paths to each application's entry script.
Can I use the same JavaScript file for different application entry points?
Yes, the same JavaScript file can be used for different application entry points as shown in the documentation where 'Acme.MyCoolExtension.MyCoolModule.js' is used for 'shopping', 'myaccount', and 'checkout'.
Are all JavaScript files specified under each application loaded during deployment?
Yes, all JavaScript files listed under each application's 'files' array in the 'javascript' object are loaded when you deploy.
Is it possible to organize JavaScript files into modules within NetSuite?
Yes, NetSuite allows organizing JavaScript files into modules as demonstrated in the documentation, where files are stored in paths prefixed with 'Modules/' and organized within specific subdirectories for each module.
Source: JavaScript 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 →