Transaction text


I would like to have automatic transaction text for one of the general journals (with specific id). After selecting vendor account the transaction text field should be filled in its name. Could you please tell me which class should I use in order to add code ?
I could not find the right place to put it.

Thank you.

Best regards,