Fixing the Infor CRM Web Email Control to Handle Single Quotes

In the Infor CRM client for all levels of 8.3 and 8.4 if you have an email control that contains an email like “phil.d’’ the email address is not correctly used to open a new email dialog. Instead the email that gets passed is “pil.d”.

This is because the launching of the email window uses client side code to call the standard mailto function. The email in the email widget in javascript is returned HTML encoded. When the client side call to mailto is made is passes this encoded string.

Lets take a look at how to fix it.

This code can be used in conjunction with Ryan’s awesome Custom Loader in a single new module.

    function (declare, lang, ActivityEditor) {

        function initializeWorkingEmail() {
            lang.extend(Sage.UI.Controls.Email, {
                sendEmail: function () {
                    var email =;                                       
                    //This is a custom function to decode the html encoded email value
                    var decodeHTML = function (str) {
                        return str.replace(/&#(\d+);/g, function (match, dec) {
                            return String.fromCharCode(dec);
                    //The decoded value is passed in the mailto
                    email = email = "mailto:" + decodeHTML(email);
                    document.location.href = email;                    

        // run customizations 

Kris Halsrud

Kris Halsrud is a Senior Analyst / Developer for Customer FX Corporation.

Submit a Comment

Your email address will not be published.

Subscribe To Our Newsletter

Join our mailing list to receive the latest Infor CRM (Saleslogix) and Creatio (bpm'online) news and product updates!

You have Successfully Subscribed!