Hiding a tab on a data entry form in CRM 3.0

I ran into an issue recently where I need to remove certain fields from a CRM data entry form. The problem is the field is “locked.” That means it can’t be removed.  Here is one solution to removing unwanted and locked fields from a data entry form:

Step 1: Prepare the environment

  1. Add a new Tab to the form.  Make sure it is the last tab on the form.
  2. Move the fields you do not want to this tab.

Step 2: Determine the internal ID of the tab. 

  1. Load the form that you want to edit in the UI (as if you were going to create a new quote).
  2. Press the CTRL + N keys on your keyboard.
  3. Click the View menu, then click Source. This will allow you to view the actual id of the tab we wish to hide.
  4. Search for the tab name within the source.
    Example: if your tab to hide was administration then search for Administration. Administration in this instance the tab ID is “tab2Tab”.

Note 1:

As a general rule, here are the first three tabs on a CRM 3.0 Form: 

tab0Tab = General Tab
tab1Tab = Details Tab
tab2Tab = Administration Tab

Note 2:

JavaScript is case-sensitive so you must enter the ID names exactly as you see them in this article, or in the file within Notepad.

Step 3: Hiding the Tab

  1. Now log into CRM and press the Settings button.
  2. Click the Customization link in the left hand navigation bar.
  3. Click custom entities in the right hand pane.
  4. Double click your entity to launch the editing page.
  5. In the editing page click the Forms and views link.
  6. In the right hand pane double click “Form” to launch the form editor.
  7. In the form editor click the “Form Properties” link.
  8. In the form properties double click the “OnLoad” event.
  9. In the onload event editor enable the event by checking the check box.
  10. In the onload event editor put in the following code using your tabId:
    tab2Tab.style.visibility = ‘hidden’;
  11. Press the OK button to accept the changes.
  12. Press the OK button to accept the form property changes.
  13. Press the Save & Close button to accept the form editor changes.
  14. In the entity editor click the Actions Menu and press the publish link to publish the changes.
  15. Close all your web browsers and reload Microsoft CRM Version 3.0.
  16. Now open up the form in the application and notice that the tab is no longer visible to the user.

 

Leave a Reply 17 comments