Engineer blog post: Dynamics CRM Online 2015 – Hide Posts, Activities or Notes Of Social Pane social - Axon IT

Written by Tim on 09 October 2019

When creating a custom entity in Microsoft Dynamics CRM Online 2015 you have the option to enable the activities section of the social pane.

Dynamics CRM Online 2015 Tips

Once enabled this cannot be disabled after the entity has been created, but you may only want your users to the see the “Posts” and “Notes” tab. There is no option out of the box to hide any of these tabs, the only option available is to make one of the tabs default.

In this example we will hide the “Activities” section of the social pane using java script.

In the customisations area of CRM we need to add a new web resource, copy the below java script and save it in a notepad file. Save the file with the extension .js

onLoad: function HideActivities() {
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”) { = “none”;
if (ele + 1 < ctrlElement.children.length) {
ctrlElement.children[ele + 1].click();
else if ((ele – 1) >= 0) {
ctrlElement.children[ele – 1].click();

Create the web resource and call it whatever you like, browse to and select the .js file you just created.

Dynamics CRM Online 2015 Advice

Next we need to add this web resource to the form you want to hide the tab. Open the form editor and select “Form Properties” from the top toolbar.

On the “Events” tab under Form Libraries click “Add” and find the web resource you just created. In the “Event Handlers” section select “OnLoad” from the drop down list. Click “Add” and select the library you just created, in my example it’s called new_RemoveActivitesTab. In the “function” box you must enter the name you gave the function in the script which in this case is “HideActivites” as you can see on line 1 of the script.

CRM Dynamics Screen Grab

Click OK, save and publish all your changes and the Activities tab will have disappeared from your form.

You might be interested in

Axon's Pandemic Readiness Plan

What Axon are doing internally to prevent the spread of COVID-19 within their workforce.

Do you know what Phishing is?

Phishing is a cybercrime that is increasing across the globe.

Are you listening and learning from Travelex’s mistakes?

Everyone has probably seen Travelex in the news this last week but what has actually happened?

Why relationship selling is the secret to selling more

Consumer buying habits have changed a lot in the last decade.