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
- Open a work object that has email attachments.
- 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:
- Open the Data-Corr-Email.Show HTML rule.
- Do a Save As and save a copy of the rule in your ruleset.
- 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
Have a question? Get answers now.
Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.