I need to add a link to an excel with detailed inf...
# ask-stanley-ai
l
I need to add a link to an excel with detailed information to the invoices we sent to customers. I think the easiest way is to add a custom transaction field to invoices, save the link there and insert it in the template. 1. Can custom transaction fields be added in the template? 2. Can the link be conditionally added in the template? (i.e., only add a sentence saying you can find the detail here + link if the custom field actually exists) 3. is there another way of doing this?
c
AI generated answer (using internal Slack threads):
Based on the conversations provided, here are the answers to your questions: 1. Yes, custom transaction fields can be added to the template. You can create a custom transaction body field by going to Customization > List, Record, Fields > Transaction Body Field > New. 2. Yes, the link can be conditionally added in the template. You can use FreeMarker in your email templates to conditionally display content based on whether a field has a value or not. For example, you could use something like this in your template:
Copy code
freemarker
<#if record.custbody_myfield?has_content>
You can find the detail here: ${record.custbody_myfield}
</#if>
This will only add the sentence and link if the custom field
custbody_myfield
has a value. 3. Another way of doing this could be to create a public suitelet (available without login), and pass a parameter for the order. However, it's recommended to generate a random guid for each order and not use the internalid, document number or any other identifier that could be guessed. Please note that parsing and escaping ampersands "&" into URLs is handled differently from one template type to another. You might need to force the field "value" into HTML encoded text or append the
"?html"
or
"?no_esc"
to your field name. ****** 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.844286561
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.835094035
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.8316921
Please provide your feedback on this answer.