• rma
  • NEWBIE
  • 0 Points
  • Member since 2013

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 2
    Replies

Need to override the standard detail page (view) of a custom object with a VF page for users in certain profiles. Tried following the example in cook book here

However I am getting a URl not found eror. For some reason the redirect URL is not working right. Need some pointers or a sample code. appreciate any kind of help. 

 

  • January 23, 2013
  • Like
  • 0

I'm trying to use a VF page for some users and not for others.  In fact, I've got 2 pages I'm doing this for: an edit page and a view page.  I'm using a fairly simple action call to make this happen, but it only works on one of the pages.

 

<apex:page action="{!if($Profile.Name = 'Sales',null,urlFor($Action.Case.View, $ObjectType.Case, null, true))}"

 I've overridden the New and the Edit buttons with my edit page, and I've overriden the View button with my view page.

 

If the user is in the Sales profile everything works great.  If they are not in the Sales profile and they click the New button, it redirects to the standard New page -except the "Cancel" button won't work (it just comes back to the same Edit page) and the URL is a disaster (cs3.salesforce.com/500/e?retURL=https%3A%2F%2Fc.cs3.visual.force.com%2Fapex%2FAgentRequestEditPage%3FretURL%3D%252F500%252Fo%26save_new%3D1%26sfdc.override%3D1&nooverride=1)

 

If a non-Sales user tries to click on a record to view the detail, I can see they are getting redirected, but they end up at a "URL No Longer Exists" page.  Likewise, that URL is also a disaster (cs3.salesforce.com/500/d?retURL=https%3A%2F%2Fc.cs3.visual.force.com%2Fapex%2FAgentRequestViewPage%3Fid%3D500Q0000002kXar%26sfdc.override%3D1&nooverride=1)

 

Can someone help me with:

A) why the View page says the URL doesn't exist and

B) Why the standard page cancel button won't work after being redirected to the new page.

 

Thanks.

 

 

I have been attempting to create a VF page that automatically redirects to another page on my sites. I do not want it to display anything simply redirect. I have looked across the all the documentation only to get lost in mountains of information. I figure this is fairly simple, I just can't seem to get it to work. Any help would be appreciated.

 

 

Here is what I have been trying to use.

<apex:page action="{page2}">

</apex:page>