vendtrans.findVoucherDate

I have added a button on the LedgerTransAccount screen and a corresponding menu item and Class.

The class picks up the voucher and I then want to find the vendtrans record so I can get the invoice number. However vendtrans.findVoucherDate is not available in the class even though I can see it in the AOT when I look at the table vendtrans.

Can anyone explain this and/or tell me how to get the Invoice Number any other way?

I think there is something fundamental I have forgotten to do, but my excuse is, I havent done any AX programming for a very long time. Help would be appreciated