What starts the code, and which SuiteScript type answers it
Usage units are NetSuite's governance budget: each API call costs some, and a script that runs out stops with an error. Mass update and workflow action scripts exist too, for narrower jobs.
What has to happen Script type Worth knowing
A check or change the moment a record is created, edited or deleted User event, with beforeLoad, beforeSubmit and afterSubmit entry points 1,000 units per run. A record saved by another user event script doesn't fire user events again, so chained logic needs planning.
Field behavior while someone fills in a form Client script: pageInit, fieldChanged, validateField, saveRecord Runs in the browser only. CSV imports, integrations and server scripts never see it.
A batch job on a timer, nightly or hourly Scheduled script 10,000 units per run. Anything that grows with your data belongs in map/reduce instead.
Thousands of records worked through in one job Map/reduce: getInputData, map, reduce, summarize NetSuite splits the work and yields on its own, so the whole run has no overall unit cap. Errors per record are collected for the summarize stage.
A custom page or form inside NetSuite Suitelet 1,000 units per request. Good for approval screens and internal tools.
An outside system calling in with data shaped its own way RESTlet 5,000 units per call. Sits beside SuiteTalk, which our NetSuite API page covers.