Create the Extension Framework

Documentation article about Create the Extension Framework Create the Extension Framework Create the Extension Framework

·1 min read·View Oracle Docs

Create the Extension Framework

Create the Extension Framework

You can create an extension manually or by using the gulp extension:create command as described in Create a Baseline Extension. For this tutorial, create your extension manually as described in the following steps.

  1. Access the top-level extension development directory you created when you installed the extension developer tools.

  2. In the top-level extension development directory, unless it already exists, create a new directory named Workspace.

  3. In the Workspace directory, set up the folders for this extension so that they look like this:

    javascript
    1Workspace/
    2 CDRExample
    3 Modules/
    4 CDRExample/
    5 JavaScript/
    6 Templates/
  4. In the Workspace/CDRExample directory, create a manifest.json file and place the following code in that file.

    json
    1{
    2 "name": "CDRExample",
    3 "fantasyName": "Context Data Request Example",
    4 "vendor": "ExampleVendor",
    5 "version": "1.0.0",
    6 "type": "extension",
    7 "target": "SCA,SCS",
    8 "target_version": {
    9 "SCA": ">=20.2.0",
    10 "SCS": ">=20.2.0"
    11 },
    12 "description": "An example extension to demonstrate contextDataRequest",
    13 "skins": [],
    14 "templates": {
    15 "application": {
    16 "shopping": {
    17 "files": [
    18 "Modules/CDRExample/Templates/cdr_example.tpl"
    19 ]
    20 }
    21 }
    22 },
    23 "javascript": {
    24 "entry_points": {
    25 "shopping": "Modules/CDRExample/JavaScript/CDRExample.js"
    26 },
    27 "application": {
    28 "shopping": {
    29 "files": [
    30 "Modules/CDRExample/JavaScript/CDRExample.js",
    31 "Modules/CDRExample/JavaScript/CDRExample.View.js"
    32 ]
    33 }
    34 }
    35 },
    36 "local_folder": "Workspace\\CDRExample"
    37}

Frequently Asked Questions (4)

Do I need any specific version of the Extension Developer Tools to use SuiteScript 2.0 files?
Yes, only the 2020.1 Extension Developer Tools and later include SuiteScript 2.0 file types as an option.
What are the prerequisites for creating the extension framework manually?
You need to have the extension developer tools installed and your top-level extension development directory set up before creating the extension framework manually.
What directory structure is required when creating an extension manually?
You need a directory named 'Workspace' within your top-level extension development directory. Inside 'Workspace', create another directory for your extension, which contains a 'Modules' folder and subfolders for 'JavaScript' and 'Templates'.
How does the 'manifest.json' file influence the extension creation?
The 'manifest.json' file contains essential configuration details for the extension, like 'name', 'vendor', version information, file structure for templates and JavaScript, and target applications (SCA, SCS). Without this file, the extension won't be configured correctly.
Source: Create the Extension Framework 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 →