C Inventory Item

From Sage Evolution SDK | Documentation Portal
Revision as of 12:02, 23 October 2015 by Admin (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

The following example is on creating a Inventory Item.

//Create a instance of the InventoryItem Class
InventoryItem invItem = new InventoryItem();
invItem.Code = "TestSDK9";
invItem.Description = "TestSDK9";
invItem.Description_2 = "Description2";
invItem.Description_3 = "Description3";
invItem.IsWarehouseTracked = true;// Properties like whther the item is a warehouse item cam be specified
 
//Prices can also be specified as follows
PriceList p1 = new PriceList("Price List 1");
PriceList p2 = new PriceList("Price List 2");
PriceList p3 = new PriceList("Price List 3");
PriceList p4 = new PriceList("New Price 4");
 
invItem.SellingPrices[p1].PriceExcl = 200;
invItem.SellingPrices[p2].PriceExcl = 300;
invItem.SellingPrices[p3].PriceExcl = 400;
invItem.SellingPrices[p4].PriceExcl = 500;
//Save the Item
invItem.Save();