Changing order number sequence within Commerce Manager


Hi Guys, I'm using Commerce Manager Version: 7.9 (build: 0)

I know I can set the CreateOrderNumber delegate prior to executing the SaveAsPurchaseOrder method to override the TrackingNumber for the PO and there is a nice article on this - - However if I create an order via the admin interface within Commerce Manager is there a way I can do the same thing? Is there an event I need to hook into?

i.e. Login into CM goto -> Order Management -> Purchase Orders - New Order

Any help is much appreciated.  Cheers Mark

Mar 04, 2015 3:11


There are some solutions to that issue. You can create your own version of OrderCreate which set the PO at saving, then register it instead of the default one (You will need to create a wrapper for it, for example CustomOrderCreateContainer.ascx, which mimicks the OrderCreateContainer, then register CustomOrderCreateContainer.ascx in PurchaseOrder-New.xml. This affects CM only.

The second way is to create your own PurchaseOrder class, which inherits from PurchaseOrder and override the AcceptChanges to make changes to PO number when you save it. This affects whole site and you might check if the order is being created or being edited. Then register new class as PurchaseOrderType in Configs\ecf.order.config 

Personally I prefer the second approach :)



Mar 04, 2015 7:50

Great thanks.  I like the second approach as well.  I've got that working now.  Cheers

Mar 05, 2015 9:53
* 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.