How to fetch the vendor bill reference in a paymen...
# ask-stanley-ai
a
How to fetch the vendor bill reference in a payment file template?
c
AI generated answer (using internal Slack threads):
To fetch the vendor bill reference in a payment file template, you can use the
${apply.refnum}
field in the template. This field is used to reference the vendor bill number in the context of a payment or application record. However, if you're using an email template (not advanced PDF) and leveraging a workflow to automatically send an email to the vendor once a bill payment is generated out of NetSuite, you might encounter an issue where it says it can't reference
apply.refnum
. This could be due to a configuration issue where the "Reference number" is not on the "Bill Payment" form. For advanced PDF templates, you can use a snippet like this to get the "Credits Applied" line values from a Bill payment (Vendor Payment) record:
Copy code
code
<#list check.credit as credit>
    <tr>
        <td align="center">${credit.creditdate}</td>
        <td align="left">${credit.appliedto}</td>
        <td align="left">${credit.refnum}</td>
        <td align="right">(${credit.amount})</td>
        <td align="right">&nbsp;</td>
        <td align="right">(${credit.amount})</td>
    </tr>
</#list>
In this snippet,
${credit.refnum}
is used to fetch the reference number. ****** 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.855701804
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.846240342
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.836332858
Please provide your feedback on this answer.