Getting frustrated with your hidden tabs always displaying at the top of your CRM form? CRM consultant Hamish explains why it happens and more importantly - what to do about it. If you'd like any more information, please ring or email me.

Problem

I recently had a requirement to include some content at the top of a CRM form which was hidden by default but displayed under certain conditions. I placed the content in a new tab at the top of the form, just below the Activity Feed tab, set the default visibility to be hidden and added JavaScript to the form to show the hidden tab when required.

When I opened a new form to create a new record the hidden tab kept on being displayed, but it wasn't my custom JavaScript that was making it visible…

When the Activity Feeds solution is installed with Dynamics CRM 2011 a very specific situation can arise where a hidden tab always displays on the form. This situation arises when the following conditions all occur at once:

  • You have activity feeds enabled for an entity
  • A hidden tab is placed on a main form of the entity, directly beneath the Activity Feed tab
  • The opened form is of type Create 

Reason

The Activity Feeds solution contains a JavaScript method for the setTabState event of the Activity Feeds tab which has proven to be the culprit.

When the form is of type Create, the JavaScript method hides the Activity Feeds tab and then sets the next tab on the form to be visible and with focus. The setTabState event gets triggered when the form loads.

Solution

Do not place a hidden tab directly beneath the Activity Feeds tab on a form. If you need hidden content at the top of the form, but below the Activity Feed, then place it in a hidden section inside the tab directly below the Activity Feed tab.

Use JavaScript to control the visibility of the hidden section rather than the tab to show the content if required.

-------------------------------------------------------

Kristy Brown

Dynamics CRM Service Line Manager

Koorb Consulting

+64274 774 384

The article Dynamics CRM form tabs gotcha was first posted at Koorb Consulting