18 thoughts on “Hide POSTS/ACTIVITIES/NOTES from Social Pane CRM 2013

  1. Hi!

    This helped a lot, but now we have a case where we’d like to hide the Posts AND the Activity Pane. We’ve managed to hide them, but the Activity Pane menu remains as default setting. Any idea how to have Notes only? Notes only like on the old imported forms?

    On the Contract Lines form there are only Notes, but we can’t figure out why, and we’d like to have it on the other main forms. We’d rather use an Activity subgrid instead of the Activity Pane…

    Thanks a lot!

    Like

  2. Thanks for the response, but unfortunately our goal is to make the Activity and Posts tabs completely invisible, not just make Notes the default tab. Just like on Contract Lines or Email, there are no other tabs apart from Notes.
    We did what you described in the post above – and the Posts tab is hidden, Notes default tab – great! But the interesting point is how to hide the Activitiy Tab as well.

    Like

    • Hi Anna,

      If i understand your requirement completely, you should have only Notes.

      Activities and Posts should hide onLoad of record.

      If this the requirement, please use the below function by removing parameters,

      function HideSocialPaneItems() {
      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.title == "POSTS") {
      ctrl.style.display = "none";
      } else if (ctrl.title == "NOTES") {
      if (ele + 1 = 0) {
      ctrlElement.children[ele – 1].click();
      return;
      }
      }
      }
      }
      }

      Like

    • Hi Anna,

      If i understand your requirement completely, you should have only Notes. Activities and Posts should hide onLoad of record.

      If this the requirement, please use the below function alone without specifying parameters as mentioned in my post,

      function HideSocialPaneItems() {
      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.title == "POSTS") {
      ctrl.style.display = "none";
      } else if (ctrl.title == "NOTES") {
      if (ele + 1 < ctrlElement.children.length) {
      ctrlElement.children[ele + 1].click();
      return;
      }
      }
      }
      }
      }

      Like

  3. This is not working I am getting error in CRM 2016 while using the above script.

    Getting error on below line
    var ctrlElement = document.getElementById(“header_notescontrol”);

    Error Message

    TypeError: Unable to get property ‘children’ of undefined or null reference
    at HideSocialPaneItems (https://dev.crm.dynamics.com/%7B635933707610000079%7D/WebResources/aac_HideTabSocialPane?ver=1256498646:4:5)
    at eval code (eval code:1:1)

    at RunHandlerInternal (https://dev.crm.dynamics.com/form/ClientApiWrapper.aspx?ver=1256498646:156:1)
    at RunHandlers (https://dev.crm.dynamics.com/form/ClientApiWrapper.aspx?ver=1256498646:115:1)
    at Anonymous function (https:dev.crm.dynamics.com/form/ClientApiWrapper.aspx?ver=1256498646:99:63)
    at Anonymous function (https://dev.crm.dynamics.com/_static/_common/scripts/MicrosoftAjax.js?ver=1256498646:1:294)

    Like

  4. Hi Arun,

    Thanks for this – managed to get it working in 2016.. Needs a parent. infront of the document.getElementById() to make it work but thanks for the code as everything else worked fine.

    Like

  5. Greate pieces. Keep posting such kind of information on your blog.

    Im really impressed by your blog.
    Hey there, You have performed an excellent job. I’ll
    certainly digg it and personally recommend to my friends.
    I am sure they’ll be benefited from this web site.

    Like

  6. I juszt like the valuable information you supply on your articles.
    I’ll bookmark your blog and take a llook at nce more right here regularly.
    I’m slightly sure I will be told many new stuff proper rright here!
    Good luck for tthe following!

    Like

  7. Thank you a bunch for sharing this with all folks you really realize what you’re talking approximately!

    Bookmarked. Please also talk over with my site =). We could have a hyperlink
    alternate arrangement among us

    Like

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