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
- Add a new Tab to the form. Make sure it is the last tab on the form.
- Move the fields you do not want to this tab.
Step 2: Determine the internal ID of the tab.
- Load the form that you want to edit in the UI (as if you were going to create a new quote).
- Press the CTRL + N keys on your keyboard.
- Click the View menu, then click Source. This will allow you to view the actual id of the tab we wish to hide.
- 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 TabNote 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
- Now log into CRM and press the Settings button.
- Click the Customization link in the left hand navigation bar.
- Click custom entities in the right hand pane.
- Double click your entity to launch the editing page.
- In the editing page click the Forms and views link.
- In the right hand pane double click “Form” to launch the form editor.
- In the form editor click the “Form Properties” link.
- In the form properties double click the “OnLoad” event.
- In the onload event editor enable the event by checking the check box.
- In the onload event editor put in the following code using your tabId:
tab2Tab.style.visibility = ‘hidden’; - Press the OK button to accept the changes.
- Press the OK button to accept the form property changes.
- Press the Save & Close button to accept the form editor changes.
- In the entity editor click the Actions Menu and press the publish link to publish the changes.
- Close all your web browsers and reload Microsoft CRM Version 3.0.
- Now open up the form in the application and notice that the tab is no longer visible to the user.