I need to include an anchor an advanced pdf templa...
# ask-stanley-ai
n
I need to include an anchor an advanced pdf template. The url in the field I'm sourcing from needs encoding it seems but I'm unable to click through the link after encoding. It seems to includ eteh work "href" and I don't know why. Can you suggest how to use a hyperlink field from a record to create a clickable link in a PDF
c
AI generated answer (using internal Slack threads):
To include a hyperlink in an advanced PDF template, you can use the following method: 1. First, you need to reference the field in your HTML code. You can do this by using the field name within curly brackets
{}
or in some cases, you might need to use it within
<NL>
tags. For example, if your field name is
custbodypg_link_so
, you can reference it like this:
{custbodypg_link_so}
or
<NLCUSTBODYPG_LINK_SO>
. 2. Then, you can use this reference in your
href
attribute of the
a
tag. Here is an example:
Copy code
html
<a href="{custbodypg_link_so}">Securely View, Edit, & Track the status of this order</a>
or
Copy code
html
<a href="<NLCUSTBODYPG_LINK_SO>">Securely View, Edit, & Track the status of this order</a>
3. If you want to make a custom field as a hyperlink to another page in NetSuite, you can use the following method:
Copy code
html
<a href="#" onclick="window.open('https://[YOURACCOUNTNUMBER].app.netsuite.com/app/accounting/transactions/purchord.nl?id=' || {createdfrom.internalid} || '&whence=', 'popup', 'width=600, height=600, resizeable=yes, location=no'); return false;">Export to Excel</a>
Replace
[YOURACCOUNTNUMBER]
with your account number and
Export to Excel
with the text you want to be displayed. Please note that the field names and URLs used in the examples are placeholders and you should replace them with your actual field names and URLs. ****** Disclaimer: This response was generated by an artificial intelligence assistant based on previous conversations from multiple Slack channels, and may contain inaccuracies or mistakes. ******
Slack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.828174353
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.826626897
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.826466382
Please provide your feedback on this answer.
Thank you for your feedback