Skip to main content

Introduction to SDF

The SuiteCloud Development Framework (SDF) is NetSuite's modern development platform for building, managing, and deploying customizations. This guide provides comprehensive coverage of SDF development from fundamentals to real-world scenarios.


What is SDF?

SDF is a development framework that allows you to:

  • Build customizations locally using your preferred IDE (VSCode)
  • Version control all customizations as code (XML and JavaScript)
  • Deploy changes consistently across accounts (Sandbox → Production)
  • Collaborate with team members using Git workflows
┌─────────────────────────────────────────────────────────────────────────────┐
│ SDF DEVELOPMENT WORKFLOW │
└─────────────────────────────────────────────────────────────────────────────┘

┌──────────────┐ ┌──────────────┐ ┌──────────────┐
│ VSCode │ │ GitHub │ │ NetSuite │
│ (Local) │ ──── │ (Source) │ ──── │ (Deployed) │
└──────────────┘ └──────────────┘ └──────────────┘
│ │ │
▼ ▼ ▼
Write Code Version Control Live System
Test Locally Collaboration Users Access
Validate Code Review Production

SDF vs Traditional Development

AspectTraditional (UI-Based)SDF (Code-Based)
DevelopmentPoint-and-click in NetSuite UIWrite code in VSCode locally
Version ControlManual backups, no historyFull Git integration
DeploymentCopy/paste, manual recreationAutomated, consistent deployment
CollaborationOne person at a timeMultiple developers, branching
RollbackDifficult, manualEasy with Git history
TestingOnly in NetSuiteLocal validation before deploy

What Can You Build with SDF?

Scripts (SuiteScript 2.1)

Script TypePurposeTrigger
SuiteletCustom pages/forms, reportsURL access
User EventRecord validation, automationRecord save/load
Client ScriptUI validation, field changesUser interaction
Scheduled ScriptBackground jobs, reportsTime-based schedule
Map/ReduceLarge data processingManual or scheduled
RESTletExternal API integrationHTTP requests
Workflow ActionCustom workflow logicWorkflow execution

Custom Objects

Object TypePurpose
Custom RecordsNew data tables
Custom FieldsExtend standard records
Custom ListsDropdown values
Saved SearchesReusable queries
WorkflowsBusiness process automation
FormsCustom entry forms
RolesUser permissions

SDF Project Components

📁 MySuiteProject/
├── 📄 suitecloud.config.js # Project configuration
├── 📄 manifest.xml # What to deploy
├── 📄 deploy.xml # Deployment settings
├── 📁 src/
│ ├── 📁 FileCabinet/
│ │ └── 📁 SuiteScripts/ # JavaScript files
│ │ ├── 📁 Suitelets/
│ │ ├── 📁 UserEvents/
│ │ ├── 📁 ClientScripts/
│ │ ├── 📁 ScheduledScripts/
│ │ ├── 📁 MapReduce/
│ │ ├── 📁 RESTlets/
│ │ └── 📁 Libraries/
│ └── 📁 Objects/ # XML definitions
│ ├── customrecord_*.xml
│ ├── customsearch_*.xml
│ ├── custworkflow_*.xml
│ └── ...
└── 📁 .git/ # Version control

Development Lifecycle

┌─────────────────────────────────────────────────────────────────────────────┐
│ SDF DEVELOPMENT LIFECYCLE │
└─────────────────────────────────────────────────────────────────────────────┘

┌──────────┐
│ PLAN │ Define requirements, design solution
└────┬─────┘


┌──────────┐
│ BUILD │ Write scripts, create objects in VSCode
└────┬─────┘


┌──────────┐
│ VALIDATE │ SuiteCloud: Validate Project
└────┬─────┘


┌──────────┐
│ DEPLOY │ Deploy to Sandbox
└────┬─────┘


┌──────────┐
│ TEST │ Test in Sandbox environment
└────┬─────┘


┌──────────┐
│ REVIEW │ Code review via Pull Request
└────┬─────┘


┌──────────┐
│ RELEASE │ Deploy to Production
└──────────┘

Prerequisites

Before starting SDF development, ensure you have:

RequirementPurpose
VSCodePrimary development IDE
SuiteCloud ExtensionNetSuite integration for VSCode
Node.jsRequired for SuiteCloud CLI
GitVersion control
NetSuite AccountSandbox for development/testing
Token-Based AuthSecure API authentication

SuiteScript 2.1 Overview

This guide uses SuiteScript 2.1 which provides modern JavaScript syntax:

/**
* @NApiVersion 2.1
* @NScriptType Suitelet
*/
define(['N/ui/serverWidget', 'N/record', 'N/search'],
(serverWidget, record, search) => {

// Arrow functions
const onRequest = (context) => {
// Const/let instead of var
const form = serverWidget.createForm({ title: 'My Form' });

// Template literals
const message = `Request method: ${context.request.method}`;

// Destructuring
const { parameters } = context.request;

context.response.writePage(form);
};

return { onRequest };
});

Key SuiteScript 2.1 Features

FeatureExample
Arrow Functionsconst fn = (x) => x * 2;
Template Literals`Hello ${name}`
Const/Letconst x = 1; let y = 2;
Destructuringconst { id, name } = record;
Default Parametersfunction fn(x = 10) {}
Spread Operatorconst arr = [...items, newItem];

What You'll Learn

This documentation covers:

Fundamentals

  1. Getting Started - Project setup, configuration, structure
  2. Script Types - All 7 script types with examples
  3. Custom Objects - Records, fields, searches, workflows

Practical Application

  1. Real-World Scenarios - Complete end-to-end implementations
  2. Deployment - Sandbox, production, rollback
  3. Best Practices - Standards, error handling, performance

SectionDescription
Project SetupCreate your first SDF project
Suitelet DevelopmentBuild custom pages
User Event ScriptsAutomate record operations
Invoice Approval ScenarioComplete workflow implementation

Next Steps

Start with SDF Project Setup to create your first SDF project.