In NetSuite Advanced PDF, I created a button to in...
# ask-stanley-ai
v
In NetSuite Advanced PDF, I created a button to include a payment link in the PDF, but the link is not rendering correctly. Here’s the code I used: <table style="margin-top:25px; width:100%;"> <tr> <td style="text-align: center;" colspan="2"> <#if record.tranid == "SO3766" && record.custbody_bambora_payment_link?has_content> <a href="${record.custbody_bambora_payment_link?html}" style="background-color:#2a5dec; color:#ffffff; font-size:14pt; font-weight:bold; text-decoration:none; padding:12px 24px; border-radius:6px; display:inline-block;"> PAY NOW </a> </#if> </td> </tr> </table>
c
AI generated answer (using internal Slack threads):
In the first thread, the user is trying to create a button on a sales order that opens a PDF template suitelet, but they are encountering a "page not found" error. The community suggests checking if the URL is being generated correctly and if the suitelet URL parameter (
stSuiteLinkParam
) contains the expected value. They also recommend using
url.resolveScript
instead of a parameter and using a client-side button handler in
form.addButton
. In the second thread, the user is having trouble rendering anything inside of
<#list record.item as item>
when generating a PDF. The community suggests simplifying the template and trying to render
item.amount
as a string within the list. They also recommend using
TemplateRenderer.renderAsString
and logging the output for debugging purposes. In the third thread, the user wants to show the invoices to which a customer payment is applied in the customer statement. The community suggests making sure the PDF code uses
line.description
and provides a sample code snippet for the user to follow. ****** 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.828656852
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.827844143
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.827430487
Please provide your feedback on this answer.