Tips, fixes & use cases
Real NetSuite problems — what the logs showed, the theory that turned out to be wrong, and what actually fixed it. Scroll for everything; each one opens in full.
-
Pricing as a process, not an event
Costs now reprice monthly whether you do or not. A bigger annual increase fails in both directions — what works is a loop: a margin sensor at order entry, a queue that persists, a console with authority, and a memory that defends each change.
-
Repricing the orders that never should have booked
The report that flags thin orders is the easy half. The console that fixes prices held four traps — a swallowed save that hid a whole division, a display function returning account numbers, the discount gross-up, and the override you must refuse to reprice.
-
When the NetSuite form submits itself
“Unexpected token _ in JSON at position 0.” The JSON is fine — a button inside a serverWidget form defaulted to type=submit, and the request you are debugging never left the page.
-
Why that column prints blank on your PDF
It shows in the UI and prints empty. A rendered PDF sees stored data, not derived data — and the key you inject has to match what the template is actually looking up.
-
MAP_REDUCE_ALREADY_RUNNING is not an error
Show it to a user as a failure and they resubmit — duplicating work that was already queued. Some exceptions describe the environment, not the outcome of the request.
-
Blanket purchase orders: which release does this invoice belong to?
Six lines, same item, same rate, same quantity. Only the expected date differs. Match on item code and every invoice for the next twelve months posts against release one.
-
Filing inbound documents with AI
One document in three never made it onto the record, because attaching it was slower than skipping it. The AI reading the paper is the easy half — resolving a handwritten reference and writing it without duplicates is the work.
-
The freight you quoted versus the freight you paid
Across thirty thousand SKUs item dimensions are never perfect, and the gap becomes shipping margin you lose one order at a time. Detecting it is the easy half; feeding the dimension errors back is what actually fixes it.
-
An ISO 20022 pain.001 file the bank accepts first time
Double-escaped entities, SWIFT character stripping, 35/140 truncation, BIC fallback — and the currency trap that overpays vendors by the FX rate without ever throwing an error.
-
ACH addenda: telling the vendor what you just paid them for
Adding a 705 addenda record is one line. Keeping the file from being rejected afterwards is the work — and the bigger prize is that paying and recording stop being two separate steps.
-
Stopping the work order cascade
A special-order item generated work orders all the way down the BOM — for subassemblies already on the shelf. The fix is one field. The three traps in getting it to stick are the interesting part.
-
MISSING_PDF_PARAMETERS when the template was never set
The error names your parameters. The parameters are fine — setTemplateByScriptId failed silently on a case mismatch four lines earlier, and a fallback path hid it for weeks.
-
Is the error you’re chasing the cause, or just a symptom?
An integration failure that looked like a payment script bug. Undeploying the script changed nothing — and that five-minute test reframed the whole investigation.
-
Reading a NetSuite stack trace
UNEXPECTED_ERROR is NetSuite saying it doesn’t know either. How to work backwards to the line that actually broke — and why the page came back full of zeroes instead of failing.
-
Fixing “(intermediate value).warn is not a function” in SuiteScript
It looks like a logging problem. It’s a mismatch between your define() array and your callback parameters — and the reason it appeared out of nowhere is worth knowing.