Change MSCRM 2013 form header using javascript

Hi every one,

you will get form subject field values as a header in Lead form. you can replace it with the topic or any other field value by using below code snippet.

copy and paste the below code in page load of Lead entity.

function changeHeaderName() {
    //var type = Xrm.Page.ui.getFormType();
    if (Xrm.Page.ui.getFormType() != "1") {
        try {
            var topic = Xrm.Page.getAttribute('subject').getValue();
            //alert(document.getElementById('FormTitle').innerHTML);
            var formElement = document.getElementById('FormTitle');
            var h1Element = formElement.getElementsByTagName('h1');
            h1Element[0].innerText = topic;

        } catch (e) {

        }
     
    }
}

Regards,
Bangar Raju Sunkari

Comments

Popular posts from this blog

Connecting Dynamics 365 Web api using external HTML page

Get azure blob files inside Sub Directories

Interview questions on MS CRM