Production-tested SuiteScript 2.1 patterns from real enterprise implementations. Each pattern includes documentation, tests, and SDF deployment artifacts.
These patterns come from projects that have collectively delivered $750K+ in annual value across 9 enterprise implementations. See the case studies at FlowSync Consulting
| Pattern | Type | Description | Tests |
|---|---|---|---|
| Batch Transaction Search | Suitelet | Parameter-driven transaction search with pagination, sorting, and CSV export | None |
| Config-Driven Suitelet | Suitelet | Data-driven column definitions for report forms | 11 tests |
| Integration Pipeline | RESTlet + Map/Reduce | Multi-stage inbound processing with segmentation, duplicate detection, and status tracking | 60 tests |
| Multi-Mode Suitelet | Suitelet | Single Suitelet serving multiple workflow modes (entry, management, billing) | 23 tests |
| Orchestrator User Event | User Event | Handler registry pattern for managing multiple record actions (surcharge, validation, field derivation) with lazy loading | 35 tests |
| PDF Generation | Suitelet + Workflow | Generate branded PDF documents from records with custom templates and email integration | None |
| RESTlet API Suite | RESTlet | 6 RESTlet endpoints with validation, error handling, and idempotent upserts | Yes |
Reusable modules used across multiple patterns:
- Governance Guard — Safe governance checking for long-running scripts
- Search Helpers — Common N/search patterns (paged search, column extraction)
- Record Helpers — Safe getValue/setText with type normalization
- Test Utils — Jest mock factories for N/search, N/record, N/runtime
npm install
npm testAll test suites use Jest with custom NetSuite module mocks in shared/test_utils.js.
Built by Ben Saralegui, NetSuite SuiteCloud Developer II. I help mid-market companies automate manual processes and integrate disconnected systems.
Found a bug or have a suggestion? Open an issue.
MIT — use these patterns freely in your own NetSuite projects.