Five New Optimizely Certifications are Here! Validate your expertise and advance your career with our latest certification exams. Click here to find out more

Change status in Order Management list

Vote:
 

How do I change a purchase order's status in the list of purchase orders in Commerce Manager by manipulating the database? I have found, and changed its status to Completed in the [OrderGroup] table.  But that only takes effect in the POs detailed view. 

Appreciate all help I can get.

#190270
Apr 06, 2018 14:57
Vote:
 

I figured it out myself. There was a meta data field set for this specific customer. I found it in OrderGroup_PurchaseOrder.

#190273
Apr 06, 2018 15:17
Vote:
 

For future visitors, updating database directly is dangerous and we advise against that. If you want to change an order status, this should be used:

var po = orderRepository.Load<IPurchaseOrder>(orderGroupId);

po.OrderStatus = OrderStatus.Cancelled; //for example.

orderRepository.Save(po);



which is much safer and future-proof.

#190277
Apr 06, 2018 15:49
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.