function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
lopezclopezc 

over write the client account tab

Hi, I need to over write the Contact Home page because I don't want some profiles can see the Report and Tools sections. I have created my own Visual Force page but I would like now to over write the Contact home page just for those profiles.

So, Can we over write the client account tab, so that sys admin’s see the standard page, other users see the visualforce page? If so how?

Any help?

Thanks!
Ron HessRon Hess
If you overwrite the home page all users will see it, there is no per profile page override.

you can have per profile sections on a page, using rendered="{}"  you can hide a section if the profile is not correct.


lopezclopezc
Thanks a lot for your feedback. Would you have an example the explain how to use rendered?

thanks again.
Ron HessRon Hess
Code:
  {!$Profile.Name}
   <apex:outputPanel rendered="{!$Profile.Name == 'System Administrator'}"> hi admin </apex:outputPanel>

 
dchasmandchasman
You can also leverage <apex:page action> to perform conditional routing based on any information you have access to in apex code. For example, this approach would allow you to show the VF page for some users and the standard page for others.


Message Edited by dchasman on 07-15-2008 09:00 AM
Ron HessRon Hess
How do you show the standard page if you have overridden the standard page?
is this done via a "nooverride"  querystring ?
dchasmandchasman
Exactly - something like this:

Visualforce markup:
<apex:page action="{!if($Profile.Name != 'System Administrator', null, urlFor($Action.Account.Tab, $ObjectType.Account, null, true))}">
    Regular User
</apex:page>

 

lopezclopezc
I managed to do it and it is working how I wanted !! 
Thanks a lot !!
kgrasukgrasu

Hi Doug,

I am referring to your following code:

Code:
<apex:page action="{!if($Profile.Name != 'System Administrator', null, urlFor($Action.Account.Tab, $ObjectType.Account, null, true))}">
    Regular User
</apex:page>

If I need to redirect the above code to a visualforce page instead of "null" for standard users, how do I do it?

Appreciate all your feedbacks on this.

Thanks and regards,

Rasu