Piece of cake to get the INLogicalID, but if it's different to the current warehouse then I want to change the sales order warehouse to the one specified from the debtor custom field.
Have tried 3 different ways to change the sales order warehouse but none are working. Need some tips!
Version 7.2.1 SR8. C#.
- Code: Select all
salesOrder.LogicalWarehouseResidingIn.ReadRecord(DefaultWarehouseID); //doesn't work
salesOrder.LogicalWarehouseResidingIn.IN_LogicalID = DefaultWarehouseID; //doesn't work
JiwaFinancials.Jiwa.JiwaApplication.Entities.LogicalWarehouse logicalWH = salesOrder.Manager.EntityFactory.CreateEntity<JiwaFinancials.Jiwa.JiwaApplication.Entities.LogicalWarehouse>();
logicalWH.ReadRecord(DefaultWarehouseID);
salesOrder.LogicalWarehouseResidingIn = logicalWH; //doesn't work