Hiding Activities Tab from Social Pane(Notes) in CRM form

The article shows you how to hide the activities tab in the Social Pane(Notes) on entity form as shown below :

2014-07-30_1358

Social Pane

Use the below javascript file to attach it to the page load of the form :


onLoad: function () { 

var ctrlElement = document.getElementById("header_notescontrol");

if (ctrlElement.children != null && ctrlElement.children.length > 0) {

for (var ele = 0; ele < ctrlElement.children.length; ele++) {

var ctrl = ctrlElement.children[ele];

if (ctrl.title == "ACTIVITIES") {

 ctrl.style.display = "none";

if (ele + 1 < ctrlElement.children.length) {

ctrlElement.children[ele + 1].click();

return;

}

else if ((ele - 1) >= 0) {

ctrlElement.children[ele - 1].click();

return;

}

}

}

}

}

Hope this helps!

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s