I have created a new inquiry form to display all posted vendor invoices across legal entities. My form currently shows only the invoice amount, excluding any applied payments to the invoice. I need to also add a field to show what is left to pay of the invoice. So I added VendTrans to my data sources to display the open balance amount. The issue I am running into is VendTrans shows all transaction types, payments, credit notes, invoices, etc. I need to filter this data source to only show the TransType of invoice. I have added the code below by overriding the executeQuery() on my data source:

I am not sure why I am getting the error above, as I have seen similar code being used by other developers. Just a different table and field. Please review my code and advise me on what I should do. I am still new to developing in X++.
*This post is locked for comments
I have the same question (0)