Hi there,
What would be a recommended way to add a new BinLocation for a specific Logical Warehouse programmatically?
Thank you.
string IN_Physical_RecID = "ZZZZZZZZZZ0000000000"; //Or you could iterate through Manager.PhysicalWarehouseCollection, looking at property "Description" to obtain the RecID you need.
string IN_Logical_RecID = "ZZZZZZZZZZ0000000000"; //Or you could iterate through Manager.PhysicalWarehouseCollection[IN_Physical_RecID].LogicalWarehouseCollection, looking at property "Description" to obtain the RecID you need.
var physicalWarehouse = Manager.BusinessLogicFactory.CreateBusinessLogic<JiwaFinancials.Jiwa.JiwaWarehouses.PhysicalWarehouse>(null);
physicalWarehouse.Read(IN_Physical_RecID);
var logicalWarehouse = physicalWarehouse.LogicalWarehouses[IN_Logical_RecID];
var newBinLocation = Manager.CollectionItemFactory.CreateCollectionItem<JiwaFinancials.Jiwa.JiwaWarehouses.BinLocation>();
newBinLocation.Description = "My new bin location";
logicalWarehouse.BinLocationCollection.Add(newBinLocation);
physicalWarehouse.Save();
Return to Technical and or Programming
Users browsing this forum: No registered users and 13 guests