Skip to content

FlowSync-Consulting/netsuite-patterns

Repository files navigation

NetSuite Patterns

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

Patterns

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

Shared Utilities

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

Testing

npm install
npm test

All test suites use Jest with custom NetSuite module mocks in shared/test_utils.js.

About

Built by Ben Saralegui, NetSuite SuiteCloud Developer II. I help mid-market companies automate manual processes and integrate disconnected systems.

Book a free discovery call

Found a bug or have a suggestion? Open an issue.

License

MIT — use these patterns freely in your own NetSuite projects.

About

Production-tested SuiteScript 2.1 patterns from enterprise NetSuite implementations

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors