web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Dynamics 365 Community / Blogs / Bring your code 2 life / CRM 2016: Social Pane Hide ...

CRM 2016: Social Pane Hide Add Phone Call or Add Task link

Andreas Cieslik Profile Picture Andreas Cieslik 9,267
To hide the "Add Phone Call" or "Add Task" link from the social pane section use the following JavaScript line in your entity's form onload script:

function Form_OnLoad()
{
setTimeout(function () {
var crmContentPnl = parent.parent.document.getElementById("crmContentPanel");
for (k = 0; k < crmContentPnl.children.length; k++)
{
if (crmContentPnl.children[k].style.visibility == "visible" && crmContentPnl.children[k].tagName.toLowerCase() == "iframe")
{
var notesControl = crmContentPnl.children[k].contentWindow.document.getElementById("notescontrolactivityContainer_notescontrol");
// phone call
notesControl.children[0].children[1].children[0].style.display = "none"; return false;');
// task
notesControl.children[0].children[1].children[1].style.display = "none"; return false;'
);
break;
}
}
},5000);
}

This was originally posted here.

Comments

*This post is locked for comments