you are not connected to a company oInvoice = ocompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oInvoices)in version 10. it works in the previous version. already updated the references SAPBo