Hola, buen día, me preguntaba si alguien puede ayudarme a solucionar este error, mi código es este
quiero agregar un registro.
try
{
SAPbobsCOM.Documents oInvoice = null;
oInvoice = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oInvoices);
oInvoice.CardCode = "C2000";
oInvoice.Lines.BaseEntry = 8;
oInvoice.Lines.BaseLine = 0;
oInvoice.Lines.BaseType = 17;
RetVal = oInvoice.Add();
if (RetVal != 0)
{
oCompany.GetLastError(out RetVal, out errMsg);
MessageBox.Show("Error" + RetVal + " " + errMsg);
}
else
{
MessageBox.Show("Invoice Number " + oCompany.GetNewObjectKey() + " created");
string InvNum = oCompany.GetNewObjectKey();
}
oInvoice = null;
RetVal = int.Parse("");
errMsg = "";
}
catch (Exception ex)
{
errMsg = ex.Message;
}