The error seen when working with The Financial Edge API is a type of warning that can be suppressed using the IBBWarningRule interface:
 
Public Sub CreateAPInvoice()

   Dim oInvoice As CAPInvoice
   Set oInvoice = New CAPInvoice
   
   With oInvoice
       .Init fe_application.SessionContext
       .Fields(APINVOICES_fld_AP7VENDORSID) = 2
       .Fields(APINVOICES_fld_REMITTO) = 1
       .Fields(APINVOICES_fld_POSTDATE) = Date
       .Fields(APINVOICES_fld_DESCRIPTION) = "NEW Test APInvoice"
       .Fields(APINVOICES_fld_PAYMENTMETHOD) = "Check"
       .Fields(APINVOICES_fld_INVOICEAMOUNT) = "$12.12"
       .Fields(APINVOICES_fld_INVOICEDATE) = "06/23/2017"
       .Fields(APINVOICES_fld_INVOICENUMBER) = "2032"
                          
       With .Distribution.Add
          .Fields(BBDISTRIBUTIONS_fld_DEBITACCTNUM) = "01-2030-00"
          .Fields(BBDISTRIBUTIONS_fld_CREDITACCTNUM) = "01-2020-00"
          .Fields(BBDISTRIBUTIONS_fld_AMOUNT) = "10.00"
          .Fields(32) = "API Description"
          .Fields(BBDISTRIBUTIONS_fld_PERCENT) = 100
       End With

       .ApplyVendorDefaults False
       
       '''''''''''''''
        Dim oIBBWarningRule As IBBWarningRule
        Set oIBBWarningRule = oInvoice
        '' Suppress all warnings: oIBBWarningRule.OverrideAllWarnings = True '
        '' 1 = There are open Purchase Orders for this Vendor.
        '' 2 = There are unapplied credit memos for this vendor.
        '' 3 = This invoice may cause you to exceed the current credit limit of $0.00 for this vendor.
        oIBBWarningRule.OverrideWarning(1) = True
       '''''''''''''''
       
       .Validate
       .Save
       .CloseDown

   End With

   Set oInvoice = Nothing
End Sub



Disclaimer: We provide programming examples for illustration only, without warranty either expressed or implied, including, but not limited to, the implied warranties of merchantability and/or fitness for a particular purpose. This article assumes you are familiar with Microsoft Visual Basic and the tools used to create and debug procedures. Our Customer Support can help explain the functionality of a particular procedure, but we will not modify, or assist you with modifying, these examples to provide additional functionality. If you are interested in learning more about the VBA and API modules, contact your account manager.