复杂的现实世界的例子

以下示例结合了此处介绍的几种技术。它在自定义格式列中放置一个超链接,单击该列时,将打开与行关联的销售订单记录。超链接用于在单击时在新窗口或选项卡中打开记录,并在悬停时显示工具提示。URL 中使用的 internalid 字段受 URL 保护,不受 URL 编码的影响。客户名称(如果可用)显示在同一列中,不受 HTML 编码的影响。

'<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>'