Skip to Content
0
Former Member
Mar 22, 2011 at 09:51 AM

Error on creating Draft Purchase Quotation by using SDK

547 Views

Hi,

I have encountered an error while trying to create a Draft Purchase Quaotation by using SDK.

I am trying on SAP Business One 8.81 PL02

My Code:

Dim objPQ As SAPbobsCOM.Documents = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oDrafts)
objPQ.DocObjectCode = SAPbobsCOM.BoObjectTypes.oPurchaseQuotations

Error on code:

objPQ.DocObjectCode = SAPbobsCOM.BoObjectTypes.oPurchaseQuotations

Error message:

'540000006' is not a valid value for property 'DocObjectCode'. The valid values are: '15' - 'Delivery', '16' - 'Returns', '203' - 'A/R Down Payment', '13' - 'A/R Invoice', '14' - 'A/R Credit Memo', '132' - 'Correction Invoice', '20' - 'Goods Receipt', '21' - 'Goods Return', '204' - 'A/P Down Payment', '18' - 'A/P Invoice', '19' - 'A/P Credit Memo', '17' - 'Sales Order', '22' - 'Purchase Order', '23' - 'Sales Quotation', '67' - 'Inventory Transfers', '59' - 'Goods Receipt', '60' - 'Goods Issue', '163' - 'A/P Correction Invoice', '164' - 'A/P Correction Invoice Reversal', '165' - 'A/R Correction Invoice', '166' - 'A/R Correction Invoice Reversal'

Thank you.