Skip to Content
author's profile photo Former Member
Former Member

error in saving invoice


I wrote an add-on that save an invoice when the user click on the add button in the invoice form (133). My program add automatically some additional expenses to the document. If I save the invoice with a VATGRoup as CA the invoice is created, if I use the VATGRoup V2 I have this error "-2028 OACT No match record found". If I save the invoice without my add-on and I use VATGroup V2 the document is created.

Can you help me?



Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • Posted on Nov 19, 2004 at 09:40 AM

    Hi Rita,

    It would be very usefull if you could post the code you use to save the invoice.

    I can suppose that you create a document and some accounting data is missing, perhaps AccountCode. Did you asign any value to it?


    Ibai Peñ

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member


      If I use my add-on on another database it saves the invoice correctly.

      vFattura.DocNum = .Items("8").Specific.String

      If .Items("78").Specific.Checked = True Then

      vFattura.HandWritten = tYES


      vFattura.HandWritten = tNO

      End If

      vFattura.DocCurrency = "EUR"

      vFattura.DocObjectCode = oInvoices

      vFattura.CardCode = Trim(.Items("4").Specific.String)

      vFattura.CardName = .Items("54").Specific.String

      vFattura.Address = .Items("6").Specific.String


      vFattura.DocDueDate =.Items("12").Specific.String

      vFattura.NumAtCard = .Items("123").Specific.String

      vFattura.Comments = .Items("16").Specific.String

      vFattura.JournalMemo = .Items("18").Specific.String


      dTotDoc =.Items("29").Specific.String


      vFattura.PaymentGroupCode = .Items("47").Specific.Selected.Value

      If .Items("3").Specific.Selected.Value = "I" Then

      vFattura.DocType = dDocument_Items


      vFattura.DocType = dDocument_Service

      End If

      For i = 1 To matRighe.RowCount - 1

      Set colRead = matRighe.Columns.Item("1")

      Set txtRead = colRead.Cells.Item(i).Specific

      If txtRead.String <> "" Then

      vFattura.Lines.ItemCode = txtRead.String

      Set colRead = matRighe.Columns.Item("3")

      Set txtRead = colRead.Cells.Item(i).Specific

      vFattura.Lines.ItemDescription = txtRead.String

      Set colRead = matRighe.Columns.Item("11")

      Set txtRead = colRead.Cells.Item(i).Specific

      vFattura.Lines.Quantity = txtRead.String

      Set colRead = matRighe.Columns.Item("17")

      Set txtRead = colRead.Cells.Item(i).Specific


      vFattura.Lines.Price = Mid(txtRead.String, 5)


      vFattura.Lines.AccountCode = "310101"

      If i < matRighe.RowCount - 1 Then


      end If


  • author's profile photo Former Member
    Former Member
    Posted on Dec 11, 2004 at 02:31 PM


    I have found the problem to this message "-2028 OACT No match record found".... really the problem is that the total of the document is not correct.

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Thank you very much!

      Also I had this problem both using directly SAP Business One both in my add on code and I couldn't understand this is because.

      For your post I understand that I had to define a Count for the roundings (having the Switzerland version of B1).

      PS: Are you italian?

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.