Retrieve extra fields of an invoice on the thank you note

Retrieve extra fields of an invoice on the thank you note

How can I retrieve the custom fields from an invoice for use on the thank you note?