CRM 2011: Setting document.title in CRM 2011 doesn't work for me RRS feed

  • Question

  • In CRM 4 I had code in a form onload event to change the form's title, among other things, depending on the current record's status, type, etc. It used to simply be something like:

    document.title = 'STATUS TEXT HERE - ' + document.title;

    The current value of document.title is what was expected but changing it in a form's onload doesn't work for me in CRM 2011. I don't see anything regarding document.title and CRM 2011 when searching. Has anyone else noticed this? Any ideas what needs to be done differently?

    FYI: I can still change the title text within the form with something like the following code:

    function addTitlePrefix(prefix) {
     var titleSpan = document.getElementById('form_title_div');
     if(titleSpan) {
      for(var i = 0;i < titleSpan.children.length;i++) {
       if(titleSpan.children[i].className == 'ms-crm-Form-Title-Data autoellipsis') {
        titleSpan.children[i].innerText = prefix + titleSpan.children[i].innerText;


    Monday, May 9, 2011 2:49 PM


All replies