Skip to main content

This content has been archived and is no longer being updated. Links may not function; however, this content may be relevant to outdated versions of the product.

Support Article

URL in email attachment does not contain correct link address

SA-94394

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

  1. Create a Correspondence rule containing a URL.
  2. Use the SendSimpleEmail activity to send an email.
  3. Reference this Correspondence in the activity.
  4. Open the attachment when the email is sent and attached to the work object.
  5. 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

Was this useful?

0% found this useful

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega Community has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.

Close Deprecation Notice
Contact us