on 10-06-2012 1:57 PM
how can i delete the warehouse from a item by SDK, i'm using B1tch app to do that by python but some way i cannot find which is the method to iterate over the warehouse from that item and delete that warehouse that i don't want that item have, i'm using this
for almacen in browse(SAPbobsCOM.BoObjectTypes.oItems, query("select TOP 1 ItemCode from OITM ")):
almacen.GetByKey(almacen.ItemCode);
almacen.WhsInfo.WarehouseCode
but that just give me the first warehouse and anyway i can't delete it
I would try with:
//retrieve item object as you want and then...
ItemWarehouseInfo iwi = oItem.WhsInfo;
//loop on warehouses
for this item for(i=0; i<iwi.Count; i++) {
iwi.SetCurrentLine(i);
if(iwi.WarehouseCode == "codeOfWarehouseIHate") {
iwi.Delete();
break;
}
}
Tell us if it works!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
97 | |
11 | |
11 | |
6 | |
6 | |
4 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.