I have a custom field on the customer record that ...
# advancedpdf
j
I have a custom field on the customer record that holds an external URL. How can I use that in an email template? Emails keep trying to tag the URL onto the end of my NS domain instead of on its own.
d
what code do you have for the URL in your template? just a reference to the field like:
${customer.custentity_urlfield}
?
j
Yeah. Like below: <a href="${customer.custentity_urlfield}">image</a>
I have tried changing the custom field type from hyperlink to text and then adding the http:// part into the template without luck. Seems that no matter how I format it, it just wants to tag it onto the end of my ns domain url.
d
just testing it myself
tested with a text field and hyperlink field, both with the value
<https://google.com>
this code correctly linked to google and didn't prepend the netsuite domain:
<a href="${customer.custentity_urltext_field}">link</a>
<a href="${customer.custentity_hyperlink_field}">link</a>
what value do you have in your text/hyperlink field?
j
Mine looks identical. However, I'm using an http value. Think that might have something to do with it?
I'll take another look tomorrow to confirm mine matches.
👍 1
d
using an http url shouldn't change anything. The only way i could replicate the issue was to use a value like
/relative/url
(so
<a href="/relative/url">link</a>
)
j
I've been taking stabs at this one for a while without success. One thing I did not mention (because at the time I didn't think it was relevant) is that this is for a marketing email template, not a regular email template. Finally found something within SuiteAnswers that says it wants to tag onto the domain for tracking. Still haven't found a solution (that keeps tracking on) so I'm finally reaching out to NS Support. Thanks for all of your help investigating this with me. I always appreciate the help.