W153: Add timeline note
Appends a note to an SO's timeline, capturing the SO's current status alongside it. Triggered from Sales Order Detail timeline section.
Steps
-
Load the SO for status context. Call
SalesOrders.getSoById. The current status becomesstatusAtTimeon the note if the caller did not supply one. -
Persist the note. Call
SalesOrders.addTimelineNotewith the body andstatusAtTime.
Returns
The new note row.
Business rules
- Status is captured at time of note. Provides context for later readers; survives subsequent SO status changes.
Errors
NotFoundError. The SO was not found.