cancel
Showing results for 
Search instead for 
Did you mean: 

Minus 10 Error code on creating a new invoice Business One Sap

0 Kudos

Hi Guys just creating a simple invoice in business one but I am getting a -10 eror in the Oinvoice.Add line.

        public void CreateInvoice(string customerCode, double fuelQty, double price)
        {
            try
            {
                SAPbobsCOM.Documents oInvoice = company.GetBusinessObject(BoObjectTypes.oInvoices);


                oInvoice.DocDate = DateTime.Now;
                oInvoice.CardCode = customerCode;
                oInvoice.Lines.ItemDescription="David Test";
                oInvoice.Lines.ItemCode = "DSL";
                oInvoice.Lines.Quantity = fuelQty;
                oInvoice.Lines.Price = price;








                int addInvoice = oInvoice.Add();


                if (addInvoice > 0 & addInvoice < 0)
                {




                }
            }catch(Exception ex)
            {




            }


        }


Accepted Solutions (0)

Answers (1)

Answers (1)

DellSC
Active Contributor
0 Kudos

Hi David,

This tag is for the SAP BusinessObjects SDK, and you're looking for help with SAP BusinessOne. I suggest asking this same question in one of the B1 tags because you probably won't get a response here.

-Dell