Hi Hamzeh,
My Suggestions:
1. You create a field, Contact Type: Patient and Doctor (which I believe you have had this field to identify the contact entity)
2. Create two view, one for Patient and another one is Doctor based on the Contact Type
3. Modify your sitemap (I think in your term is Navigation Menu, I guess)
Then create new two sitemap sub area, this time not using Entity as your URL.
But, instead, using the View URL, see this link:
msdn.microsoft.com/.../gg328483.aspx
Take a look in this section:
Display a View in the Application Navigation using the Site Map
When you customize the application navigation using the site map, do not use the view URL that you copied from the application using the steps in Copy the URL for a View to set as the URL. That URL displays a page that includes the ribbon and produces undesirable results if used in a <SubArea> (SiteMap) Url attribute.
To display a list of entity records within the application for a SubArea set the Entity attribute value. This displays the default view for that entity and provides the correct title and icon.
However, if you want to have a SubArea element that uses a specific initial default view, use the following Url pattern.
Url=“/_root/homepage.aspx?etn=<entity logical name >&viewid=%7b<GUID value of view id>%7d”
When you use this URL, you must also specify appropriate values for <Titles> (SiteMap) and <Descriptions> (SiteMap), and specify an icon for the entity.
Note |
If you specify the view using the /_root/homepage.aspx page, the view selector will still be shown. If the user changes the view, Microsoft Dynamics CRM remembers the user’s most recent selection and the initial default view displays after they close and re-open their browser. |
So, it will open new view based on the sitemap URL you set, you can set to the view ID based on the views you've created in previous step.
4. If you want to also differentiate by Form, then Create two forms or just create one form that on the form onload, you have function to show or hide fields based on the Contact Type.
*You notice the Note, CRM will still open the view with selector shown, so the user still can change.
If you really want the user to not choose view selector, then you should create your own view.
Check this:
http://msdn.microsoft.com/en-us/library/gg695790.aspx
You can use AdxStudio Portal to retrieve view + the data, very easy, but I think in this case it is too overkill.
I would prefer to choose first solution or if the users insist to hide the selector then you should create your own view using Portal Development.
Hope this helps!
Thanks.