NetSuite SuiteCloud Development Framework

This blog provides a concise overview of NetSuite’s SuiteCloud Development Framework (SDF), explores the reasons for its use within NetSuite, and explains how it facilitates customization projects.

What is SuiteCloud Development Framework?

NetSuite SuiteCloud Development Kit (SDK) provides NetSuite Developers with SuiteCloud Development Framework (SDF) which is a development environment used to create and deploy Account Customization Projects or SuiteApps within NetSuite. SDF enables developers to create customizations and applications on a cloud-based system providing access to the application/feature to all the permitted users within NetSuite.

Why is SDF used in NetSuite?

The SuiteCloud Development Framework (SDF) serves several key purposes aimed at enhancing the development and deployment process within the NetSuite ecosystem:

  1. Streamlined Development Process:
  • Local Development: SDF allows developers to work in their local environments using their preferred development tools and Integrated Development Environments (IDEs). This local development capability improves productivity and efficiency, providing developers with comfortable infrastructure to develop.
  • Custom Objects and Scripts: Developers can create and manage custom records, fields, scripts (SuiteScript), workflows (SuiteFlow), Segments and other configurations locally.
  1. Efficient Deployment:
  • Environment Management: SDF facilitates the deployment of customizations across different NetSuite instances (e.g., from a sandbox to production). This ensures consistency and reduces the risk of errors during the deployment process.
  • Automated Deployment: The SDF command-line interface (CLI) automates the deployment process, making it easier and faster to move customizations from one environment to another.
  1. Version Control Integration:
  • Source Control: SDF supports integration with version control systems like Git. This allows developers to track changes, manage versions, and collaborate more effectively on projects.
  • Change Management: With version control, teams can manage and revert changes if necessary, ensuring a more controlled development process.
  1. Project-Based Customization:
  • Project Structure: SDF uses a project-based approach where all customizations are systematically organized within a project. This structure simplifies the management and deployment of customizations.
  • Manifest File: The manifest file in an SDF project lists all the components, instances and their dependencies, ensuring that everything required for the customization/application is included and deployed correctly.
  1. Enhanced Collaboration:
  • Team Development: Multiple developers can work on the same project simultaneously in NetSuite, with changes being tracked and merged through version control systems.
  • Consistency: Standardizing the development and deployment processes helps ensure that all team members follow the same practices, leading to more consistent and reliable customizations.
  1. Improved Quality and Reliability:
  • Validation: SDF includes tools like Debugger for validating customizations before deployment, helping to identify and fix issues early in the development process.
  • Error Reduction: By automating deployment and integrating with version control, SDF reduces the likelihood of manual errors, improving the overall quality and reliability of customizations.

 

How to use SuiteCloud Development Framework?

1. Firstly, we need to enable the required features in NetSuite

Log in to NetSuite: Use your administrator credentials to log in to your NetSuite account.

NetSuite SuiteCloud Development Framework

2.  To navigate to Enable Features, go to Setup > Company > Enable Features:

NetSuite SuiteCloud Development Framework

3. Enable SuiteCloud Features:

Under the SuiteCloud tab, ensure the following features are enabled:

  • Server SuiteScript
  • Client SuiteScript
  • Custom Records
  • SuiteFlow
  • SuiteBundler
  • SuiteCloud Development Framework

 

4. Save your changes.

5. Set Up the Development Environment

Install Node.js on your device:

Download and install Node.js from nodejs.org. Node.js is required for the SuiteCloud Command Line Interface (CLI).

Install SuiteCloud CLI:

Open a terminal or command prompt and install the SuiteCloud CLI globally using npm (Node Package Manager):

NetSuite SuiteCloud Development Framework

6. Configure Authentication and Permissions in NetSuite

  • Create an Integration Record in NetSuite:
  • Go to Setup > Integration > Manage Integrations > New.
  • Fill in the details, such as name and state (keep it enabled) and ensure User Credentials checkbox is selected for Authentication.
  • After saving, note the Consumer Key and Consumer Secret. These will be used for CLI authentication. Note that this Consumer Key and Secret will be visible only ONCE, so it is recommended to save them in a local text file on the device.
NetSuite SuiteCloud Development Framework NetSuite SuiteCloud Development Framework
  • Assign Permissions to a Role:

Go to Setup > Users/Roles > Manage Roles > New.

Create a new role or edit an existing role (from Manage Roles list) and assign the following permissions with given access in the Permissions subtab:

  1. SOAP Web Services (Full)
  2. REST Web Services (Full)
  3. Login using Access Tokens (Full)
  4. SuiteScript (Full)
  5. Custom Record Types (Full)
  6. Any other permissions required for your specific customizations
  • Assign this role to your user account.
NetSuite SuiteCloud Development Framework

7. Set Up Token-Based Authentication (TBA)

Create Access Tokens:

  1. To create the access token, go to Setup > Users/Roles > Access Tokens > New.
  2. Select your application (Integration record), user, role and provide a name to the Token.
NetSuite SuiteCloud Development Framework

After saving the Access Token, note the Token ID and Token Secret. This Token ID/Secret will be visible only 1 time when the Access Token is created so it is recommended to save it in a local text file.

NetSuite SuiteCloud Development Framework

8. Initialize and Configure Your SDF Project

Authenticate CLI with NetSuite:

  • Open your terminal or command prompt and authenticate using the SuiteCloud CLI by using the following command:
  •  
  • Follow the prompts to enter your NetSuite account ID, email, role ID, consumer key, consumer secret, token ID, and token secret.

 

Create a New SDF Account Customization Project:

  • Use the CLI to create a new SDF project:
  • suitecloud project:create --projectname MySDFProject --projecttype ACCOUNTCUSTOMIZATION
  • This will create a project structure with the necessary files and directories.

 

9. Develop and Deploy Customizations

Develop Customizations: Use your preferred IDE to develop custom objects, SuiteScripts, workflows, and other configurations within the SDF project structure.

Validate the Project: Before deployment, validate the project to ensure there are no errors through the following command

Deployment to a NetSuite Account: Deploy your project to a sandbox or production account:

NetSuite SuiteCloud Development Framework

Follow the prompts to select the target account and confirm deployment.

 

10. Continuous Development and Maintenance

  • Version Control: Use a version control system like Git to manage your SDF project. This helps to track the changes and collaborate with other developers.
  • Update and Maintain: Continuously update and maintain your SDF project, incorporating new features and fixing bugs as necessary.

Example Commands

  • Create a new script file:

suitecloud file:create --type script --name MyScript.js --projectfoldersrc/FileCabinet/SuiteScripts

  • Deploy specific files:

suitecloud file:deploy --paths src/FileCabinet/SuiteScripts/MyScript.js

By following these steps, you can enable the SuiteCloud Development Framework in your NetSuite account and use it to develop, manage, and deploy customizations efficiently.

 

Conclusion

SuiteCloud Development Framework is a system provided by NetSuite for developers to easily develop, deploy, debug, maintain and manage customizations and applications in NetSuite in a singular and streamlined process. This system increases efficiency and reduces time consumption and the efforts of developers by providing automation of deployment architecture as an agent between SuiteCloud SDK and NetSuite.