You need to sign in to do that
Don't have an account?
CmF
Need to remove account View Hierarchy link
We are using a partner portal. We need to remove the View Hierarchy link from the account page. It shows all accounts, not just the accounts the partner owns. (It isn't the sharing rules, everything is private so if they click on an account it says Insufficient Privileges). I only want to remove the hierarchy link from the partner view, not all views so we need to take the profile into consideration.
I've created a vf page that works, but how do I override the standard View of accounts for just 1 profile?
Does any one have any suggestions? I am desperate!
Thanks so much. I have been playing with this for 2 months. Here are my vf page and controller in case someone else can use it.
public class overrideAcctView {String recordId;
public overrideAcctView(ApexPages.StandardController controller)
{recordId = controller.getId();}
public PageReference doRedirect()
{ Profile p =
[SELECT name from Profile where id = :UserInfo.getProfileId()];
if (p.name == 'Custom-PartnerUser')
{ PageReference customPage = Page.PartnerAcctView;
customPage.setRedirect(true);
customPage.getParameters().put('id', recordId);
return customPage; }
else
{ PageReference stndPage = Page.stndAcctView;
stndPage.setRedirect(true);
stndPage.getParameters().put('id', recordId);
return stndPage; }
} }
All Answers
I believe that you have created a VF page .
Now you need to display it just for one profile.. right??
If this is the case, one of the workarounds (not a very good one, but works) is to display an intermediate VF page which overrides the Accounts view, in case of the specifc profile, redirect it to your VF page, otherwise to the standard page :)
Thanks so much. I have been playing with this for 2 months. Here are my vf page and controller in case someone else can use it.
public class overrideAcctView {String recordId;
public overrideAcctView(ApexPages.StandardController controller)
{recordId = controller.getId();}
public PageReference doRedirect()
{ Profile p =
[SELECT name from Profile where id = :UserInfo.getProfileId()];
if (p.name == 'Custom-PartnerUser')
{ PageReference customPage = Page.PartnerAcctView;
customPage.setRedirect(true);
customPage.getParameters().put('id', recordId);
return customPage; }
else
{ PageReference stndPage = Page.stndAcctView;
stndPage.setRedirect(true);
stndPage.getParameters().put('id', recordId);
return stndPage; }
} }
You can use a side bar component wherein you can write your javascript code to either hide or override the link. Add that component on the home page.