You need to sign in to do that
Don't have an account?
navigation to standard pages using Page reference method
Hello,
I am using the below code to redirect to the standard salesforce pages as:
public PageReference Save()
{
String newPageUrl = 'https://ap1.salesforce.com/701/o';
PageReference newPage = new PageReference(newPageUrl);
newPage.setRedirect(true);
return newPage;
}
This piece of code helps in navigating the page to campaign default page.Here the url-"https://ap1.salesforce.com/701/o" is the campaigns default page url for my account.
Instead of passing the complete url is there any way to redirect to sandard campaign page in pageReference method.
Thanks,
shaan
Hey
You should be able to use the relative part of the URL. That way you could change servers without having any issues,
PageReference newPage = new PageReference('/701/o');
I'm not sure if you ahve to include that first foward slash though.
Wes
All Answers
Hey
You should be able to use the relative part of the URL. That way you could change servers without having any issues,
PageReference newPage = new PageReference('/701/o');
I'm not sure if you ahve to include that first foward slash though.
Wes
Thanks for ur reply wes , i am able to use the relative part url for navigation.
I have a doubt that will the relative part url ('/701/o') will be the same for all SF accounts.
I mean the '/701/0' relative part will be similar for other standard pages.
thanks
shaan
Hey
It should work. Other standard page URLs can be found:
http://salesforce.phollaio.com/2007/01/11/salesforces_url_structure/
Cheers,
Wes