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
SeniorMoveSeniorMove 

Controlling Record Navigation in Visualforce

Hi.

 

Working on the classic case of needing to fully customize a Customer Portal, so I'm using Sites.

 

The problem I'm having is this:

 

I have a Visualforce page to emulate Cases.  How do I control the navigation in such a way so that when the user clicks a hyperlink they're taken to another one of my custom VF pages, instead of to the standard object?

 

Example:

 

VF page with a Case record ... one of the fields on the page layout shows the Contact Name, ( Joe Smith ) which is obviously a hyperlink back to the standard Contact object.

 

When the user clicks Joe Smith how can I ensure the user is passed to a custom VF page instead of the standard object Contact page?

 

Thanks for any help.  Code samples always appreciated!! :smileyhappy:

kiranmutturukiranmutturu

if your joe smith is your link then on click of that link  you can execute the pagereference method and navigate to the respective page

 

public pagereference gotourl(){

pagereference pg = page.yourpagename;

return pg;

}

SeniorMoveSeniorMove

Thanks Kiran, but wouldn't that only accommodate a single redirect?

 

In addition to Contact information in the case details, there is also Account information.  So as with Joe Smith, I would also need to redirect the user to a customer VF page for Accounts.