function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
FlashFlash 

Custom Objects: State Transition?

I have a custom "Order" object with a picklist "status" field. I want to enforce that an Order's status starts as "Pending", then "Submitted", then "In Progress", then "Complete", or some other specific sequence of status changes.

What's the best approach for trying to enforce these kinds of state transitions? (e.g. how would I prevent somebody from changing an "in progress" order back to "pending", etc.?)