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

Email attachments are not opening with Chrome browser

SA-13727

Summary



Users are unable to open email attachments using Chrome browser.


Error Messages



This content is currently only compatible with Internet Explorer


Steps to Reproduce

  1. Open a work object that has email attachments.
  2. Try to open the email attachment using Chrome.


Root Cause



This functionality has been enhanced in Pega 7.1.8 to allow HTML based emails to be opened across all the browsers. Word-based correspondence attachments require the Open Authoring OCX so those would still require Internet Explorer.

Resolution



Perform the following local-change to allow HTML based emails to be opened across all browsers:
  1. Open the Data-Corr-Email.Show HTML rule.
  2. Do a Save As and save a copy of the rule in your ruleset.
  3. Replace the loadMe function with the code below and save.

  function loadMe() {

    var oOpenAuthor;
      var sCurEditFileName;

      // Try to recreate the Word file complete with attachments,
      // from the encoded, zipped string retrieved from the record.
      sCorrBodyVal = document.getElementById("corrBody").value;
      sCorrZipBodyVal = document.getElementById("corrZippedBody").value;

    if (sCorrZipBodyVal != "") {
        sCurEditFileName = document.getElementById("corrWordName").value;

        if (sCurEditFileName != "") {
        
            // We can't currently handle a Word-based correspondence attachment without the Open Authoring OCX, so it won't work outside of Internet Explorer.
            var nonIE = navigator!=null && (navigator.appName.indexOf("Microsoft")== -1) && !(navigator.userAgent.match(/Trident\/7.0/) && navigator.userAgent.match(/.NET4.0E/)) ;
            if(nonIE) {
                    alert("This content is currently only compatible with Internet Explorer");
                         return;
            }
            // Analyze OCX load status.
            if (document.getElementById("OpenAuthorFail") != null) {
                alert("Error - Open Authoring control failed to load.");
                oOpenAuthor = null;
                return;
            } else {
                oOpenAuthor = document.getElementById("OpenAuthor");
            }
        
            sCurWordDocPath = oOpenAuthor.sWordDocDecodeUnzip( sCurEditFileName, sCorrZipBodyVal);
            if (sCurWordDocPath == "") {
                    alert("Error - Decode/Unzip failed.");
                    return;
            }
            
            var sViewText = oOpenAuthor.sHtmWordDocGet( );
            if( sViewText != "" ) {
                var oFrameDoc = ShowIFrame.document;
                oFrameDoc.open("text/html");
                oFrameDoc.write(sViewText);
                oFrameDoc.close();
                disableAnchors(oFrameDoc);
                oOpenAuthor.bKillEditedWordDoc(sCurEditFileName, sCurWordDocPath);
                return;
            } else {
                alert("Error - Opening word file failed.");
                return;
            }

        } else {
            alert("Error - Word Document name is missing for the correspondence.");
        }

    } else {
        var sViewText = sCorrBodyVal;
        var oFrameDoc = ShowIFrame.document;
        oFrameDoc.open("text/html");
        oFrameDoc.write(sViewText);
        oFrameDoc.close();
        disableAnchors(oFrameDoc);
        disableEditableElements(oFrameDoc);    
    }

}

 

Published September 3, 2015 - Updated October 8, 2020

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