Okay, so I recently coded something to check the PmPaidTransactionHistTable to ensure that there were no duplicates and ran into an issue due to the fact that unposted transactions which were still in "work" were not checked. So I'm wondeirng if there's a different table for those invoices. Here is my code btw,
Dim CustomerMasterTableID As PmPaidTransactionHistTable
Dim CustomerMasterInvoiceVendor As PmPaidTransactionHistTable
Dim TabErr As TableError
Dim VendErr As TableError
CustomerMasterTableID = Dynamics.Tables.PmPaidTransactionHist
CustomerMasterInvoiceVendor = Dynamics.Tables.PmPaidTransactionHist
' Find the proper keys
CustomerMasterInvoiceVendor.Key = 1
CustomerMasterTableID.Key = 3
' Used Vendor and Invoice to symbolize the two variables that I was looking for; vendorname and invoicenumber.
CustomerMasterTableID.DocumentNumber.Value = invoice
CustomerMasterInvoiceVendor.VendorId.Value = VendorId
'Retriving the error
TabErr = CustomerMasterTableID.Get()
VendErr = CustomerMasterInvoiceVendor.Get()
If TabErr = TableError.NoError And VendErr = TableError.NoError Then
Error 123
Else
End If
CustomerMasterInvoiceVendor.Close()
CustomerMasterTableID.Close()
*This post is locked for comments