Creating Entry Point Files for SuiteCommerce Modules
Entry point files are essential for SuiteCommerce modules, connecting them to the application and enabling functionality.
The entry point file plays a crucial role in integrating your module with the SuiteCommerce Advanced (SCA) and Site Management Tools (SMT). It establishes the necessary connection for modules to function correctly within the SCA architecture.
Key Aspects of Entry Point Files
- The entry point file can be created as either a JavaScript or TypeScript file depending on your project needs.
- The file must be created in the JavaScript directory of your CCT module.
Steps to Create the Entry Point File:
-
Create a New JavaScript or TypeScript File
Place the file in your CCT module's JavaScript directory, naming it intuitively to represent your module.
Examples:- JavaScript:
../SC.CCT.ImageViewer@0.0.1/JavaScript/SC.CCT.ImageViewer.js - TypeScript:
../SC.CCT.ImageViewer@0.0.1/JavaScript/SC.CCT.ImageViewer.ts
- JavaScript:
-
Define Entry Point Dependencies
Include all necessary dependencies in your file.
JavaScript Example:javascriptundefined
define(
'SC.CCT.ImageViewer',
[
'SC.CCT.ImageViewer.View'
],
function (
SCCCTImageViewerView
)
**TypeScript Example:** ```typescript /// <amd-module name="SC.CCT.ImageViewer"/> "text-purple-400">import SCCCTImageViewerView = "text-purple-400">require('./SC.CCT.ImageViewer.View'); -
Create the
mountToApp()Method
This method initializes your CCT module, making it available in the application. It includes thegetComponent('CMS').registerCustomContentType()function, which registers your module in SMT.- ID Variable: Should correspond to the CMS content type, in lowercase.
- View Variable: Initializes the view for your module.
JavaScript Example:
javascript1{2 'use strict';3 //@"text-purple-400">class SC.CCT.ImageViewer4 "text-purple-400">return {5 mountToApp: "text-purple-400">function mountToApp (application)6 {7 application.getComponent('CMS').registerCustomContentType({8 id: 'sc_cct_imgageviewer',9 view: SCCCTImageViewerView10 });11 }12 };13});TypeScript Example:
typescript1{2 'use strict';3 //@class SC.CCT.ImageViewer4 export function mountToApp(application) {5 application.getComponent('CMS').registerCustomContentType({6 id: 'sc_cct_imgageviewer',7 view: SCCCTImageViewerView8 });9 }10}; -
Save the File
Important Notes:
- Your source code must not alter the default SC.CCT.Html module as it connects the SCA application to core content types in SMT.
Related Topics:
- [Create Custom Content Types for SMT]
- [Create a Custom Module for Your CCT]
- [Create a View File]
- [Set Up Your ns.package.json and distro.json Files]
This comprehensive guide on creating entry point files ensures you efficiently connect your SuiteCommerce modules within the SCA framework, facilitating smoother implementation and integration.
Source: This article is based on Oracle's official NetSuite documentation.
Frequently Asked Questions (4)
Is it possible to use TypeScript for creating entry point files in SuiteCommerce?
Where should the entry point file be located for a SuiteCommerce module?
Do I need to register my custom content type in the SuiteCommerce Advanced architecture?
Can I modify the default SC.CCT.Html module when implementing my custom entry point file?
Was this article helpful?
More in General
- Field Service Management Enhancements and Bug Fixes for 2026
Overview of the 2026 Field Service Management SuiteApp updates showcasing enhancements and bug fixes.
- Example
Documentation article about Example
- Pass String Literals
Documentation article about Pass String Literals
- Manual Edits
Documentation article about Manual Edits
Advertising
Reach General Professionals
Put your product in front of NetSuite experts who work with General every day.
Sponsor This Category