Extend the Backend Configuration File

Documentation article about Extend the Backend Configuration File

·3 min read·View Oracle Docs

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:

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

  2. Create the SuiteScript subdirectory in your new module directory.

    Because the backend configuration file is a SuiteScript file, this directory is required.

  3. Create a new JavaScript file in the SuiteScript directory of your custom module.

    In this example, this file is named BackendConfigurator.js.

  4. Add code to redefine the backend configuration properties you want to change.

    For example, the code you add should look similar to:

    javascript
    1"text-purple-400">define('BackendConfigurator'
    2, [
    3 'Configuration'
    4 ]
    5, "text-purple-400">function (
    6 config
    7 )
    8{
    9 'use strict';
    10 //disable CMS
    11 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 Configuration object. 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 useCMS property to false.

  5. 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:

    json
    1{
    2 "gulp": {
    3 "ssp-libraries": [
    4 "SuiteScript/*.js"
    5 ]
    6 }
    7}
  6. 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 dependencies of the ssp-libraries object.

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

General Notices

--- Context from https://docs.oracle.com/en/cloud/saas/netsuite/ns-online-help/section_4749956145.html --- This example applies to Vinson implementations of SuiteCommerce Advanced (SCA) and later. For details about configuring SCA for Vinson and earlier releases, see Extend JavaScript Configuration Files.

The following procedure explains how to use the Configuration Modification method to change existing configurable propert

Frequently Asked Questions (4)

Does extending the backend configuration file apply to all versions of SuiteCommerce Advanced?
No, extending the backend configuration file applies only to pre-Vinson implementations of SuiteCommerce Advanced (SCA). For Vinson or later releases, you should refer to the documentation on modifying JSON configuration files.
Do I need to define the `mountToApp` method when creating a custom module for the backend configuration file?
No, you do not need to define the `mountToApp` method when creating a custom module to extend the backend configuration file. You only need to add your custom module as a dependency in the distro.json file.
Where should I list my custom module in the distro.json file to extend the backend configuration file?
You should add your custom module to the `modules` section and the `dependencies` of the `ssp-libraries` object in the distro.json file. Make sure to add it at the top of the list to prevent other modules from overwriting your customizations.
Do I need any specific JavaScript dependencies when extending the backend configuration file?
Yes, the only required dependency when extending the backend configuration file is the `Configuration` object, which is defined in the Configuration.js file located in the Modules/Ssplibraries directory of the SCA source directory.
Source: Extend the Backend Configuration File 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 →