Support Article
URL in email attachment does not contain correct link address
Summary
Hyperlinks in Email Correspondence attachments (Data-Corr-Email) do not open the correct links. Instead the same correspondence opens in a window or tab of the browser.
Error Messages
Not Applicable
Steps to Reproduce
- Create a Correspondence rule containing a URL.
- Use the SendSimpleEmail activity to send an email.
- Reference this Correspondence in the activity.
- Open the attachment when the email is sent and attached to the work object.
- Access the URL.
Root Cause
Hyperlinks present in the Corr rule were disabled intentionally in the out-of-the-box Data-Corr-Email.Show HTML rule.
This logic is present in the disableAnchors function.
Resolution
Update the below function in the out-of-the-box Data-Corr-Email.Show HTML rule,
function disableAnchors(frameDoc) {
for (i=0; i<frameDoc.links.length; i++) {
frameDoc.links[i].href = "javascript:alert('Disabled link: " + frameDoc.links[i].href + "');";
frameDoc.links[i].target = "";
}
}
To
function disableAnchors(frameDoc) {
for (i=0; i<frameDoc.links.length; i++) {
/* frameDoc.links[i].href = "javascript:alert('Disabled link: " + frameDoc.links[i].href + "');"; */
frameDoc.links[i].target = "_blank";
}
}
Published November 26, 2019 - Updated December 2, 2021
Have a question? Get answers now.
Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.