Shipment has no status nor warehousecode

Member since: 2007

Version CM 10.7.2

Hi experts, 

Having some problem since last update to 10.7.2. Somehow the customer makes the purchase and ONLY SOME PurchaseOrder only have one shipment and doesnt have any status (normal is waiting inventory) and warehousecode is emptystring.

Some orders are working and some NOT... 

We are running following when customer checkout is finished

...

OrderGroupWorkflowManager.RunWorkflow(cart, OrderGroupWorkflowManager.CartCheckOutWorkflowName);

...

po = cart.SaveAsPurchaseOrder();

...

   po.AcceptChanges();

...

// Remove old cart
cart.Delete();
cart.AcceptChanges();

What am i missing? has something changed?

#180838 Edited, Jul 28, 2017 12:53
  • Member since: 2011

    Which version did you upgrade from? In 9.22 LineItem.WarehouseCode was obsoleted and we use Shipment.WarehouseCode instead. Perhaps you have some code that rely on LineItem.WarehouseCode? 

    #180846 Jul 28, 2017 15:11
  • Member since: 2007

    yes, there is use of LineItem.WarehouseCode in the code...

    but in what process is the shipment split up per warehouse and the shipment.WarehouseCode set? 

    Regards

    #180848 Jul 28, 2017 15:31
  • Member since: 2011

    It's in GetFulfillmentWarehouseActivity, which is used in many workflows, like CartValidate, CartPrepare etc.

    #180849 Jul 28, 2017 15:48
  • Member since: 2007

    allright, checked it out, but i still dont get where the shipment are split per warehouse. Somehow it fails sometimes in our solution.

    Is it still normal practice to  addtocart with form.LineItems.Add(item)? you are not suppose to create shipment when you add lineitem to cart, are you?

    #180864 Edited, Jul 31, 2017 8:59
  • Member since: 2007

    Anyhow... the problem was that when you logged in / registered in checkout, you are handling the cart from anonymous to logged in. I had to run CartValidate after that procedure (on the new cart) to make it work.

    Regards

    #181009 Aug 06, 2017 11:51