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
Ian Lin 439Ian Lin 439 

All orders are visible to all Sales representative but order line item can’t be edited after activated, but it can only be cancelled.How to do this

Bahtiyar IshkabulovBahtiyar Ishkabulov
Hi Ian,
Clarify please, what do you mean saying "cancelled"?
Ian Lin 439Ian Lin 439
Order status equals Cancelled.It is a picklist Field
Bahtiyar IshkabulovBahtiyar Ishkabulov
You only can modify an Order (or Order Items) if it's not activated. So, to make such cancellation you have to change its status to draft (either manually or from apex), then update the order items and then activate the order again.