The following example combines several of the techniques covered here. It puts a hyperlink in a custom formatted column which, when clicked, opens the sales order record associated with a row. The hyperlink is designed to open the record in a new window or tab when clicked, and to display a tooltip when hovered. The internalid
field used in the URL is protected from URL encoding. The customer name, when available, is displayed in the same column, protected from HTML encoding.
'<div style="font-size:11pt">'
||
CASE {mainline}
WHEN '*' THEN '<br>' || htf.escape_sc( regexp_substr( {name} , '[^:]*$' ) ) || '<br>'
END
||
'<a alt="" title="Open the order associated with this line." '
||
'href="javascript:void(0);" onClick="window.open('''
||
'https://system.na1.netsuite.com/app/accounting/transactions/transaction.nl?id='
||
utl_url.escape( {internalid} )
||
''' , ''_blank'' )">'
||
{number}
||
'</a>'
||
'</div>'