Extend Backend Configuration File for SuiteCommerce Advanced
Guide for extending the backend configuration file in pre-Vinson implementations of SuiteCommerce Advanced.
This example applies to pre-Vinson implementations of SuiteCommerce Advanced (SCA) only. For details about configuring SCA for Vinson or later releases, see Modify JSON Configuration Files.
Important:
Making changes to core JavaScript source files or changing vital functionality of the application can make migrating to future releases difficult. Before making changes to SCA, see Best Practices for Customizing SCA.
SCA uses a backend configuration file to modify the behavior of NetSuite features. See Extend the Backend Configuration File for more information.
During deployment, the backend configuration file is combined and deployed as a SuiteScript library in NetSuite. Like other JavaScript customizations, best practice is to create a custom module that redefines the configuration properties that you want to modify. However, since this file is deployed as a SuiteScript library, you only add your custom module to the distro.json file as a dependency. You do not need to define the mountToApp method.
To extend the backend configuration file:
-
Create the directory structure for your custom module.
In this example, the name of the custom module is BackendConfigurator, so the module directory would be
BackendConfigurator@1.0.0. -
Create the SuiteScript subdirectory in your new module directory.
Because the backend configuration file is a SuiteScript file, this directory is required.
-
Create a new JavaScript file in the SuiteScript directory of your custom module.
In this example, this file is named
BackendConfigurator.js. -
Add code to redefine the backend configuration properties you want to change.
For example, the code you add should look similar to:
javascript1define('BackendConfigurator'2, [3 'Configuration'4 ]5, function (6 config7 )8{9 'use strict';10 //disable CMS11 config.useCMS = false;12});This sample code performs the following:
-
Lists the dependencies required by the custom module. When customizing the backend configuration file, the only required dependency is the
Configurationobject. This object is defined in the Configuration.js file located in the Modules/Ssplibraries directory of the SCA source directory. -
Redefines a single configuration property. In this case, the custom module is setting the
useCMSproperty tofalse.
-
-
Create and edit the the ns.package.json file in the root directory of your custom module.
Your ns.package.json file should contain code similar to:
json1{2 "gulp": {3 "ssp-libraries": [4 "SuiteScript/*.js"5 ]6 }7} -
Edit the distro.json file.
You must add your custom module to the distro.json file for it to be loaded into the application. Because this module is extending an SSP library, you must add it in the following locations:
-
Add the name of your custom module to the
modules. To ensure that your customizations are not overwritten by other modules, add the custom module to the top of the . -
Add the name of your custom module to the
dependenciesof thessp-librariesobject.
-
-
View your changes.
Because the backend configuration file is a SuiteScript file and stored as an SSP library, you must deploy your custom module directly to NetSuite to view your changes. See Deploy SCA Customizations to NetSuite for more information.
Related Topics
- Example SCA Customizations
- Create a Custom Module
- Modify JSON Configuration Files
- Extend Frontend Configuration Files
- Configure Facet Fields
- Add a Child View to a Composite View
- Override a Template File
- Extend a Sass File
- Add a Sticky Button
- Customizing the Loading Icon
- Adding a Custom Web Font
- Extending Font Awesome
- Displaying Device-Specific Carousel Images
General Notices
Frequently Asked Questions (4)
Does extending the backend configuration file apply to all versions of SuiteCommerce Advanced?
Do I need to define the `mountToApp` method when creating a custom module for the backend configuration file?
Where should I list my custom module in the distro.json file to extend the backend configuration file?
Do I need any specific JavaScript dependencies when extending the backend configuration file?
Was this article helpful?
More in Platform
- Edit Extension Manifest for SuiteScript in NetSuite 2023.2
Learn how to manually edit the extension manifest.json file in NetSuite SuiteScript and safeguard your changes.
- Configuring Sass in NetSuite Extensions: Complete Guide
This guide covers how to configure Sass in NetSuite extension's manifest.json file and ensure proper deployment. Manual Edits
- RecordType Property for SuiteQL Metadata Retrieval in NetSuite
RecordType property retrieves metadata for SuiteQL queries. Essential for fetching valid fields and relationships.
- Create Custom Module.ServiceController in NetSuite 2019.2
Create a Custom Module.ServiceController to handle HTTP requests in NetSuite 2019.2. Step 1: Create a Custom [Module].ServiceController
Advertising
Reach Platform Professionals
Put your product in front of NetSuite experts who work with Platform every day.
Sponsor This Category