There are instances where the user would like to set a link text that would mask the actual URL that is to be set on a custom body hyperlink field.
If the script that is to be used is not a Suitelet, a getField would be used instead of addField.
Below is a sample code:
function beforeLoad(type, form)
Please take note though that this only works on view mode. By the time that you edit the record, the actual URL will be shown.
Also, the Store Value option on the custom body field record should be unchecked.