20 November 2007

Hide/remove/move/change entity level tags at runtime


/* Removing Sub-Account navigation bar at runtime */
if(document.all.navSubAct != null)
{
navSubAct.style.display = 'none';
}

/* Hiding Service Tag at runtime */
if(document.all._NA_CS != null)
{
document.all._NA_CS.style.display = 'none';
}

/* Moving Case under details group at runtime */
if((document.all.navService != null) && (document.all._NA_Info != null))
{
document.all._NA_Info.appendChild(navService);
}

/* Changing group name from 'Sales' to 'Management' */
if (document.all._NA_SFA != null)
{
document.getElementById("_NA_SFA").innerHTML = document.getElementById("_NA_SFA").innerHTML.replace("Sales","Management");
}

6 comments:

  1. Anonymous9:33 am

    Jim - Can you post details of how to do this in CRM 4.0?

    ReplyDelete
  2. I just performed this in the same way in CRM 4.0 and it works great. My remaining question is: how can I remove the lines between the entities in the navigation pane?

    ReplyDelete
  3. Anonymous3:34 pm

    How Can I delete the line, Just like Hettie said?

    ReplyDelete
  4. Anonymous5:57 pm

    Code for removing line (Sales):

    //Hide horizontal line

    var lis = document.getElementsByTagName('LI');

    var i = 0;
    //Loop through the list items
    while (i < lis.length)
    {

    if(lis[i].getElementsByTagName('A')[0] != null)
    {

    if (lis[i].getElementsByTagName('A')[0].id == '_NA_SFA')
    {

    //Replace the DHTML with blank tags
    lis[i].outerHTML='';

    }
    }

    i = i + 1;
    }

    ReplyDelete
  5. Hi, I have used this code and it works but i want that entity label is placed at the same level that the other entities labels. Is it possible?


    if((document.all.navService != null) && (document.all._NA_Info != null))
    {
    document.all._NA_Info.appendChild(navService);
    }

    ReplyDelete
  6. Where you do place this code to change the Sales tag?

    ReplyDelete