Home » Deeper in to NetSuite » Developing NetSuite SuiteApp Using SDF

Developing NetSuite SuiteApp Using SDF

Part 1: SuiteApp Overview

Preface

This article is intended for NetSuite developers and administrators. It may also be helpful for sales and marketing personnel and solution providers.

Official definition 

SuiteApps are applications or bundles that extend NetSuite for specific industry and business needs. They are developed by Oracle-NetSuite, or by members of the SuiteCloud Developer Network (SDN), a third-party developer program. NetSuite customers can also build their own SuiteApps to meet their specialized requirements or engage Professional Services. Reference 

Who can develop?

As per the definition following entities can develop SuiteApp

  • Oracle-NetSuite
  • SDN Members
  • NetSuite Customer (NetSuite Account Holder)

What does it promise?

  • Extend NetSuite Functionalities
  • Reusability
  • SuiteApp Control Center
  • SuiteApp MarketPlace
  • Streamline Development
  • CI/CD Support

Extend NetSuite Functionality

It is developed under SuiteCloud Development Framework (SDF) using a set of APIs provided as SuiteScript. These altogether provide a broader range of customization and extensibility of NetSuite.

Reusability 

It is a self-contained application that keeps track of and accesses all the dependencies on its own including scripts, scripts deployment records, custom records, custom fields, and any other objects that support SDF via XML schema available in NetSuite.

That makes it guaranteed to be run on any NetSuite account. It has a whole set of mechanisms of distribution and utilization, please see SuiteApp Control Center and SuiteApp Marketplace

SuiteApp Control Center

SuiteApp Control Center is a singular location to define and manage your SuiteApp distribution process. You can upload SuiteApp projects to SuiteApp Control Center and distribute them as SuiteApp versions to the SuiteApp Marketplace. See the below diagram

Image is taken from: https://docs.oracle.com/en/cloud/saas/netsuite/ns-online-help/chapter_1526582942.html

SuiteApp Marketplace

The above diagram also locates the SuiteApp Marketplace position. Its sole purpose is to provide a portal for users to find, download and utilize with some administrative control.

Part 2: SuiteApp Project Prerequisites

Let’s start with some basic understanding.

SuiteCloude is a platform and as a platform it provides following

  1. Framework SuiteCloud Development Framework (SDF)
  2. A set of APIs and Libraries labeled as SuiteScript
  3. A development Tool called SuiteCloude CLI

SuiteApps are created using the SDF, and there are two use cases for a SuiteApp created using SDF

  1. Directly deploy to a NetSuite Account
  2. Distribute to SuiteApp Marketplace through SuiteApp Control Center

To distribute to SuiteApp Marketplace it may require SuiteApp bundles created using SuiteBundler. Users can install SuiteApps from the SuiteApp Marketplace.

Other text will focus on developing and deploying on a NetSuite Account.

Prerequisites

  1. NetSuite Account
  2. JavaScript Knowledge
  3. Knowledge of NetSuite Fundamentals
  4. SuiteCloude CLI installed on the developer system

SuiteCloud CLI for Node.js Installation Prerequisites

  • Java SE Development Kit — SuiteCloud CLI for Node.js requires Oracle JDK version 17.
  • Node.js — SuiteCloud CLI for Node.js requires Node.js version 16 LTS.
  • Operating system — SuiteCloud CLI for Node.js officially supports the following operating systems:
    • Windows 32–bit
    • Windows 64–bit
    • Mac OS
    • Linux 64–bit
  • NetSuite account features — An account administrator must enable the features in your account that SDF depends on. For more information, see Enabling SuiteCloud Development Framework in the Target NetSuite Account (Administrator Only).
  • NetSuite permissions — An account administrator must create and assign the SDF Developer role to your account. For more information, see Assigning the Developer Role (Administrator Only).

(These versions are subject to the time of writing this article)

SuiteCloud Installation

First, you must see the SuiteCloud CLI for Node.js Installation Prerequisites then you can simply run the following command and follow the instruction. A license agreement will be asked you are required to accept that.

npm install -g @oracle/suitecloud-cli

Part 3: SuiteApp Project Development

Get your hands dirty!

The best way to understand development is to create an example SuiteApp.

Since now we have a framework, necessary libraries, and command line interface on hand and are ready to dive into the development

So now, is the right time to see the scenario

Scenario

You are in a workflow that requires changes on different customization frequently. You create, update, and delete files and objects like custom records, deployments, etc. You need to keep these modifications streamlined. Also, your company will use CI/CD for upcoming updates.

First, we will create a SuiteApp Project. It is a type of SuiteCloud Project. One more type of SuiteCloud Project called Account Customization Project, see the difference

SuiteCloude is a platform and being platform it provides the following to developers

  1. SuiteCloud Development Framework (SDF)
  2. APIs/Libraray SuiteScript 
  3. SuiteCloud CLI

One last thing!

The following table lists the properties which must be specified when you create a SuiteApp project.

  1. Publisher ID: A global presence/namespace in the SutieCloud world, assigned by SuiteCloud Developer Network (SDN), e.g. com.example
  2. Project ID: A unique identifier to assign to the project, e.g. mysuiteapp
  3. Project Name: A name of your project, e.g. MySuiteApp
  4. Project Version: The version to assign to your project, e.g. 1.02.01242017

SuiteApp Application ID

The SuiteApp workspace name is the application ID, consisting of the following components:

Now we have enough and let’s create a project.

suitecloud project:create –projectname MySuiteApp –type SUITEAPP –publisherid com.foliothree –projectid mysuiteapp –projectversion 1.0.0

OR use interactive mode, it will ask you for the same parameters as above

suitecloud project:create -i

It will create a project structure

You create all of your scripts in FileCabinet/SuiteApps/your.applicaiton.id 

Conclusion

Once you create your project you can use all SuiteScript APIs to complete the purpose of the given job by adding needed scripts. 

The following are available commands 

CommandDescription
account:manageauthManages authentication IDs for all your projects.
account:savetokenSaves a TBA token to use with the SuiteCloud CLI for Node.js.This command only supports non-interactive mode.
account:setupSets up an account to use with the SuiteCloud CLI for Node.js.This command only supports interactive mode.
file:createCreates a SuiteScript file in the selected folder.
file:importImports files from an account to your Account Customization Project.
file:listLists the files in the File Cabinet of your account.
file:uploadUploads files from your project to an account.
object:importImports SDF custom objects from an account to your SuiteCloud project.
object:listLists the SDF custom objects deployed in an account.
object:updateOverwrites the SDF custom objects in the project with their matching objects imported from your account. In the case of custom records, custom instances can be included.
project:adddependenciesAdds missing dependencies to the manifest file.
project:createCreates a SuiteCloud project, either a SuiteApp or an Account Customization Project (ACP).
project:deployDeploys the folder containing the project.
project:packageGenerates a ZIP file from your project, respecting the structure specified in the deploy.xml file.
project:validateValidates the folder containing the SuiteCloud project.

See further details on command reference here.

About the Author

About the Author

Khalid Anwar
Senior Software Engineer - Folio3

Khalid Anwar is doing his best to design and deliver quality customization of NetSuite. He has several years of related experience and played a vital role in significant projects. He completed a wide range of projects with customer satisfaction. He has a great interest in Java platforms, web services, integration, and modern technologies. History and historical events inspire him much. He also loves poetry and travel.

Get In Touch With Our Experts


    Part 1: SuiteApp Overview

    Preface

    This article is intended for NetSuite developers and administrators. It may also be helpful for sales and marketing personnel and solution providers.

    Official definition 

    SuiteApps are applications or bundles that extend NetSuite for specific industry and business needs. They are developed by Oracle-NetSuite, or by members of the SuiteCloud Developer Network (SDN), a third-party developer program. NetSuite customers can also build their own SuiteApps to meet their specialized requirements or engage Professional Services. Reference 

    Who can develop?

    As per the definition following entities can develop SuiteApp

    • Oracle-NetSuite
    • SDN Members
    • NetSuite Customer (NetSuite Account Holder)

    What does it promise?

    • Extend NetSuite Functionalities
    • Reusability
    • SuiteApp Control Center
    • SuiteApp MarketPlace
    • Streamline Development
    • CI/CD Support

    Extend NetSuite Functionality

    It is developed under SuiteCloud Development Framework (SDF) using a set of APIs provided as SuiteScript. These altogether provide a broader range of customization and extensibility of NetSuite.

    Reusability 

    It is a self-contained application that keeps track of and accesses all the dependencies on its own including scripts, scripts deployment records, custom records, custom fields, and any other objects that support SDF via XML schema available in NetSuite.

    That makes it guaranteed to be run on any NetSuite account. It has a whole set of mechanisms of distribution and utilization, please see SuiteApp Control Center and SuiteApp Marketplace

    SuiteApp Control Center

    SuiteApp Control Center is a singular location to define and manage your SuiteApp distribution process. You can upload SuiteApp projects to SuiteApp Control Center and distribute them as SuiteApp versions to the SuiteApp Marketplace. See the below diagram

    Image is taken from: https://docs.oracle.com/en/cloud/saas/netsuite/ns-online-help/chapter_1526582942.html

    SuiteApp Marketplace

    The above diagram also locates the SuiteApp Marketplace position. Its sole purpose is to provide a portal for users to find, download and utilize with some administrative control.

    Part 2: SuiteApp Project Prerequisites

    Let’s start with some basic understanding.

    SuiteCloude is a platform and as a platform it provides following

    1. Framework SuiteCloud Development Framework (SDF)
    2. A set of APIs and Libraries labeled as SuiteScript
    3. A development Tool called SuiteCloude CLI

    SuiteApps are created using the SDF, and there are two use cases for a SuiteApp created using SDF

    1. Directly deploy to a NetSuite Account
    2. Distribute to SuiteApp Marketplace through SuiteApp Control Center

    To distribute to SuiteApp Marketplace it may require SuiteApp bundles created using SuiteBundler. Users can install SuiteApps from the SuiteApp Marketplace.

    Other text will focus on developing and deploying on a NetSuite Account.

    Prerequisites

    1. NetSuite Account
    2. JavaScript Knowledge
    3. Knowledge of NetSuite Fundamentals
    4. SuiteCloude CLI installed on the developer system

    SuiteCloud CLI for Node.js Installation Prerequisites

    • Java SE Development Kit — SuiteCloud CLI for Node.js requires Oracle JDK version 17.
    • Node.js — SuiteCloud CLI for Node.js requires Node.js version 16 LTS.
    • Operating system — SuiteCloud CLI for Node.js officially supports the following operating systems:
      • Windows 32–bit
      • Windows 64–bit
      • Mac OS
      • Linux 64–bit
    • NetSuite account features — An account administrator must enable the features in your account that SDF depends on. For more information, see Enabling SuiteCloud Development Framework in the Target NetSuite Account (Administrator Only).
    • NetSuite permissions — An account administrator must create and assign the SDF Developer role to your account. For more information, see Assigning the Developer Role (Administrator Only).

    (These versions are subject to the time of writing this article)

    SuiteCloud Installation

    First, you must see the SuiteCloud CLI for Node.js Installation Prerequisites then you can simply run the following command and follow the instruction. A license agreement will be asked you are required to accept that.

    npm install -g @oracle/suitecloud-cli

    Part 3: SuiteApp Project Development

    Get your hands dirty!

    The best way to understand development is to create an example SuiteApp.

    Since now we have a framework, necessary libraries, and command line interface on hand and are ready to dive into the development

    So now, is the right time to see the scenario

    Scenario

    You are in a workflow that requires changes on different customization frequently. You create, update, and delete files and objects like custom records, deployments, etc. You need to keep these modifications streamlined. Also, your company will use CI/CD for upcoming updates.

    First, we will create a SuiteApp Project. It is a type of SuiteCloud Project. One more type of SuiteCloud Project called Account Customization Project, see the difference

    SuiteCloude is a platform and being platform it provides the following to developers

    1. SuiteCloud Development Framework (SDF)
    2. APIs/Libraray SuiteScript 
    3. SuiteCloud CLI

    One last thing!

    The following table lists the properties which must be specified when you create a SuiteApp project.

    1. Publisher ID: A global presence/namespace in the SutieCloud world, assigned by SuiteCloud Developer Network (SDN), e.g. com.example
    2. Project ID: A unique identifier to assign to the project, e.g. mysuiteapp
    3. Project Name: A name of your project, e.g. MySuiteApp
    4. Project Version: The version to assign to your project, e.g. 1.02.01242017

    SuiteApp Application ID

    The SuiteApp workspace name is the application ID, consisting of the following components:

    Now we have enough and let’s create a project.

    suitecloud project:create –projectname MySuiteApp –type SUITEAPP –publisherid com.foliothree –projectid mysuiteapp –projectversion 1.0.0

    OR use interactive mode, it will ask you for the same parameters as above

    suitecloud project:create -i

    It will create a project structure

    You create all of your scripts in FileCabinet/SuiteApps/your.applicaiton.id 

    Conclusion

    Once you create your project you can use all SuiteScript APIs to complete the purpose of the given job by adding needed scripts. 

    The following are available commands 

    CommandDescription
    account:manageauthManages authentication IDs for all your projects.
    account:savetokenSaves a TBA token to use with the SuiteCloud CLI for Node.js.This command only supports non-interactive mode.
    account:setupSets up an account to use with the SuiteCloud CLI for Node.js.This command only supports interactive mode.
    file:createCreates a SuiteScript file in the selected folder.
    file:importImports files from an account to your Account Customization Project.
    file:listLists the files in the File Cabinet of your account.
    file:uploadUploads files from your project to an account.
    object:importImports SDF custom objects from an account to your SuiteCloud project.
    object:listLists the SDF custom objects deployed in an account.
    object:updateOverwrites the SDF custom objects in the project with their matching objects imported from your account. In the case of custom records, custom instances can be included.
    project:adddependenciesAdds missing dependencies to the manifest file.
    project:createCreates a SuiteCloud project, either a SuiteApp or an Account Customization Project (ACP).
    project:deployDeploys the folder containing the project.
    project:packageGenerates a ZIP file from your project, respecting the structure specified in the deploy.xml file.
    project:validateValidates the folder containing the SuiteCloud project.

    See further details on command reference here.

    About the Author

    About the Author

    Khalid Anwar
    Senior Software Engineer - Folio3

    Khalid Anwar is doing his best to design and deliver quality customization of NetSuite. He has several years of related experience and played a vital role in significant projects. He completed a wide range of projects with customer satisfaction. He has a great interest in Java platforms, web services, integration, and modern technologies. History and historical events inspire him much. He also loves poetry and travel.

    Get In Touch With Our Experts

      I have read and agree to the Privacy Policy of Folio3
      I agree to be contacted by Phone or Email by Folio3

      Get in touch with the

      Award-Winning

      End-to-end NetSuite Servicing Agency

      Tell us how may we assist you!