cancel
Showing results for 
Search instead for 
Did you mean: 

ProductionOrders object

Former Member
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

Former Member

I use this and Work


Set oProdOrders = oCompany.GetBusinessObject(oProductionOrders)
oProdOrders.duedate = myDueDate
oProdOrders.ItemNo = myItemCode
oProdOrders.PlannedQuantity = myPlannedQuantity
oProdOrders.ProductionOrderOriginEntry = DocEntryOfSalesOrder 
oProdOrders.ProductionOrderOrigin = bopooManual
oProdOrders.ProductionOrderStatus = boposPlanned
oProdOrders.CustomerCode = CardCode  ''', ....  bla bla 

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Michele,

It's working now.

Thank you so much!!!!

Joanne