Hiding a tab on a data entry form in CRM 3.0
30
Dec
Posted by: mitch in: Dynamics CRM
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 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
- 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.
13 Responses
Enrique Bravo
23|Feb|2006 1In the Step 2, I can't get the tabID. When I press CTR + N, nothing happen in the UI and i can't see the View menu either.
Thanks
mitch
23|Feb|2006 2Enrique,
When you press Ctrl+N, a new Internet Explorer window should open and you should now see the standard IE menu and toolbars.
Regardless, I've been meaning to update this article that cuts directly to the "how to" section:
Tabs within a CRM form are numbered sequentially from 0 to X and are named as follows:
tab0Tab = General Tab
tab1Tab = Details Tab
tab2Tab = Administration Tab
etc.
So, if you want to know the ID of the tab in question, count from left to right starting at zero and you will be able to determine the correct tab ID.
Mitch
Mark
04|Mar|2006 3Hi Mitch…
Any idea if this should work on custom entity forms? I've tried but it just doesnt work…
Also can this menthod only hide the last tab on a page?
I've tried that as well with no luck either…
Many thanks.
Mark.
mitch
05|Mar|2006 4I worked with Mark via email and we finally figured out what happened. JavaScript is case-sensitive so you must type in the ID name exactly as I have it in the article.
I'll amend the article to correct my oversight.
Mitch
erdem
25|Mar|2006 5hi. I have another question: there is a tab that is required by a team and must not be written on by another team members. they van read but not write. how can I do that?
also, there is another tab that a team uses and it is not necessary for the other. I want to hide the tab from the team that is not using the tab, where the other team should actively be able to use it. Any help will be appreciated.
mitch
26|Mar|2006 6What you are needing to do is pretty much beyond the scope of what you can do with JavaScript, I think.
I would suggest contacting CRMeXtension to see what they have to offer regarding your requirement.
http:///www.CRMeXtension.com
I would suggest that you take a look at their CRMeXtension Privileges Add-On for Microsoft CRM 3.0.
Mitch
Rhett
21|Apr|2006 7Just to let you know that the single quotes tab2Tab.style.visibility = ‘hidden’; around hidden need to be double quotes in my version of MSCRM3. tab2Tab.style.visibility = "hidden";
mitch
21|Apr|2006 8Rhett,
I've seen it work both ways. Something that I didn't mention in this article, but elsewhere, is if you copy the code from this blog and paste it into CRM, you'll need to fix the quotes. The blog engine puts in "smart" quotes, which CRM doesn't like. Simply deleting and re-typing the single quotes will correct the issue.
Mitch
Mitch Milam’s Microsoft Discussions » Blog Archive » Update: Hiding CRM 3.0 Form Tabs
17|Jul|2006 9[…] Hiding a tab on a data entry form in CRM 3.0 […]
Mitch Milam’s Microsoft Discussions » Blog Archive » Anniversaries
30|Dec|2006 10[…] I posted my first article, exactly 12 months ago, today. It has been very interesting and exciting to meet people from around the world who work with the same systems that I do, and who encounter many of the same problems. I have learned a tremendous amount from other people's blogs over the past couple of years and I hope that some of my information has been valuable to others as well. […]
MRB
11|Jan|2007 11One question (or issue) about hiding a tab.
I am able to hide the tab; however, if the user goes to File > Print the print will display ALL attributes on the form including the hidden tab attributes.
Do you know a work around to remove this from the print view?
Matt
jtmartin64
22|Jan|2008 12MS CRM 4.0 - Hello, is there any reason that this wouldn't work in CRM 4.0? I'm testing prior to upgrading a client and this doesn't seem to work (I get an error on the form). The in the onload is: tab1Tab.style.visibility = ‘hidden’;
where the second tab does exist. The entity is custom and the form has 3 tabs. Thanks. Jon
mitch
22|Jan|2008 13juse the technique outlined in this article instead:
http://blogs.infinite-x.net/2006/07/17/update-hiding-crm-30-form-tabs/
Leave a reply
Search
Categories
Archives
Meta
Most Viewed
Tags
A design creation of Design Disease
Copyright © 2007 - Mitch Milam's Microsoft Discussions - is proudly powered by WordPress
InSense 1.0 Theme by Design Disease brought to you by HostGator Web Hosting.