Skip to Content
0
Former Member
Jul 12, 2006 at 06:18 AM

ProductionOrders object

137 Views

Hi,

I need to set ProductionOrderOriginNumber when I create new production order.

I used below code for that.

vProdOrder = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oProductionOrders)

vProdOrder.ProductionOrderStatus = SAPbobsCOM.BoProductionOrderStatusEnum.boposPlanned

vProdOrder.ProductionOrderType = SAPbobsCOM.BoProductionOrderTypeEnum.bopotStandard

vProdOrder.ItemNo = ItemCode

vProdOrder.CustomerCode = CardCode

vProdOrder.Warehouse = WhsCode

vProdOrder.ProductionOrderOrigin = SAPbobsCOM.BoProductionOrderOriginEnum.bopooSalesOrder

vProdOrder.ProductionOrderOriginNumber = DocNum

vProdOrder.PlannedQuantity = Quantity

vProdOrder.PostingDate = Now

vProdOrder.DueDate = Now

But I've got error on "vProdOrder.ProductionOrderOriginNumber = DocNum" line because this property is read-only.

How to set original sales order number ?

Please help me!!!

Joanne