locked
CRM 2013/2015 Main list Email Hyperlink RRS feed

  • Question

  • IN CRM When you view list of records for contact/leads/Customer, if the Main page have attribute Email shown, it will display as plain text. I mean by default Email field is not hyperlinked.

    Does any one know how to enable Hyperlink on Email field on Main List Page?? I know we can inject javascript using the Home Ribbon section, but How can we apply that with every records in Grid?? Any one tried it before please assist.


    Tuesday, January 20, 2015 9:52 PM

Answers

  • Any Idea on this issue?? 
    • Marked as answer by Nicksoft2011 Monday, January 26, 2015 1:59 PM
    Saturday, January 24, 2015 7:57 PM
  • I end up using below code. it is unsupported way of doing this. I added ribbon button to trigger below function. This technique might be useful for Hyperlinking the column text to any external site or any internal WebERP site based on text. Hope it helps someone.  Let me know if someone has any trouble doing similar assignments.


    function  hyperlinkEmailText(){
        try {
            debugger;
            var maxColumnsNumber = 15;
            var tableContactList = document.getElementById('gridBodyTable');
            if (tableContactList) {
                var rowContactList = tableContactList.rows
                var columnEmail =8;
                for (var c = 0, col; col = tableContactList.rows[0].cells; c++) {
                    if (col[c]) {
                        if (col[c].firstChild) {
                            var columnName = col[c].firstChild.nodeValue;
                            if (columnName == "E-mail") {
                                columnEmail = c;
                            }
                        }
                    }
                    if (c == maxColumnsNumber) break;
                }
                for (var i = 0, row; row = tableContactList.rows[i]; i++) {
                    if (row.cells[columnEmail]) {
                        if (row.cells[columnEmail].firstChild) {
                            var emailNode = row.cells[columnEmail].firstChild;
                            if (emailNode != "E-mail" && emailNode.firstChild) {
                                if (emailNode.firstChild.nodeValue != null) {
                                    var emailText = emailNode.firstChild.nodeValue;
                                    if (emailText.indexOf('@') > -1) {
                                        row.cells[columnEmail].innerHTML = "<nobr class='gridcellpadding' title='" + emailText + "'><a href='mailto:" + emailText + "' target='_top'>" + emailText + "</a></nobr>";
                                    }
                                }
                            }
                        }
                    }
                }
            }
            return false;
            
        } catch (ex) { alert('JavaScript Error In hyperlinkEmailText:' + ex.description); }
    }
    • Edited by Nicksoft2011 Sunday, January 25, 2015 9:23 PM
    • Marked as answer by Nicksoft2011 Monday, January 26, 2015 1:59 PM
    Sunday, January 25, 2015 9:22 PM

All replies

  • Any Idea on this issue?? 
    • Marked as answer by Nicksoft2011 Monday, January 26, 2015 1:59 PM
    Saturday, January 24, 2015 7:57 PM
  • I end up using below code. it is unsupported way of doing this. I added ribbon button to trigger below function. This technique might be useful for Hyperlinking the column text to any external site or any internal WebERP site based on text. Hope it helps someone.  Let me know if someone has any trouble doing similar assignments.


    function  hyperlinkEmailText(){
        try {
            debugger;
            var maxColumnsNumber = 15;
            var tableContactList = document.getElementById('gridBodyTable');
            if (tableContactList) {
                var rowContactList = tableContactList.rows
                var columnEmail =8;
                for (var c = 0, col; col = tableContactList.rows[0].cells; c++) {
                    if (col[c]) {
                        if (col[c].firstChild) {
                            var columnName = col[c].firstChild.nodeValue;
                            if (columnName == "E-mail") {
                                columnEmail = c;
                            }
                        }
                    }
                    if (c == maxColumnsNumber) break;
                }
                for (var i = 0, row; row = tableContactList.rows[i]; i++) {
                    if (row.cells[columnEmail]) {
                        if (row.cells[columnEmail].firstChild) {
                            var emailNode = row.cells[columnEmail].firstChild;
                            if (emailNode != "E-mail" && emailNode.firstChild) {
                                if (emailNode.firstChild.nodeValue != null) {
                                    var emailText = emailNode.firstChild.nodeValue;
                                    if (emailText.indexOf('@') > -1) {
                                        row.cells[columnEmail].innerHTML = "<nobr class='gridcellpadding' title='" + emailText + "'><a href='mailto:" + emailText + "' target='_top'>" + emailText + "</a></nobr>";
                                    }
                                }
                            }
                        }
                    }
                }
            }
            return false;
            
        } catch (ex) { alert('JavaScript Error In hyperlinkEmailText:' + ex.description); }
    }
    • Edited by Nicksoft2011 Sunday, January 25, 2015 9:23 PM
    • Marked as answer by Nicksoft2011 Monday, January 26, 2015 1:59 PM
    Sunday, January 25, 2015 9:22 PM