UPS Hyperlink in invoice e-mail APR

Very good suggestion! However I just tried it and it came out like this:

So close!!!

I wonder if it has to do with the < and > characters (from the inserted field place holder) being nested within the <a..> tag

Try the following:


<a onclick="openTracker()"><TrackingNumber/><a/>

<script>
function openTracker() {
  window.open("http://wwwapps.ups.com/WebTracking/track?track=yes&trackNums=<TrackingNumber/>");
}
</script>

In the above, the <TrackingNumber> inserted field is never inside any one <...> tag

edit

using <a href="" onclick="openTracker()"><TrackingNumber/></a>
(the addition of href="") will make the text between the <a> and the </a> appear as a link (color and underline styles applied).

It 100% does. The formatting for the inputted fields from the insert button (on the E-Mail Template) are almost seen as part of the html tag. Before closing the email template, the a tag looks like this:

After opening it back up, it goes to this:

If only the field was formatted to something like ${Epicor_Field}

Can you have a <script> ...</script> section in those emails?

edit

maybe simpler than my prior use of an onclick() handler would be:



<a id="tn">12345</a>
<script>
var a = document.getElementById('tn');
a.href = "http://wwwapps.ups.com/WebTracking/track?track=yes&trackNums="+'<TrackNum>';
</script>

Nope, I tried

</script>
document.getElementById("tNumATag").href="https://www.fedex.com/apps/fedextrack/?tracknumbers=" + <tNum/>
</script>

And also the script you posted with the onclick(). Both no results.

Wouldn’t be surprised if <script> sections was scrubbed out by either Epicor or your mail client (or both!) for security reasons.

If it is a BAQ report than use the method mentioned above, to make a calc field that builds the whol <a> ...</a> tag as a string

In the BAQ, a calc field of type string, with expression

'<a href=\"http://wwwapps.ups.com/WebTracking/track?track=yes&trackNums=\" + TrackingNumber.ToString() + '\">' + TrackingNumber.ToString() + '</a>'

Then when you insert that filed just have it by itself.

For me, I’m updating the tracking number with a REST call, from an asp.net web app.

I create the a tag in C# and patch it to the custom field created on the BO’s UD table

And then call that field directly using the insert button on the E-Mail Template.

Yeah, most likely the mail client. Allowing emails that can proc a script just by opening it, never seemed like a great idea.