Discussions
- General Development
- Schema Development
- Apex Code Development
- Visualforce Development
- Formulas & Validation Rules
- Security
- Mobile
- Force.com Sites & Site.com
- Chatter Development
- Java Development
- .NET Development
- Perl, PHP, Python & Ruby
- Desktop Integration
- APIs and Integrations
- Visual Workflow
- Apple, Mac and OS X
- VB and Office Development
- AppExchange Directory & Packaging
- Salesforce Labs & Open Source Projects
- Other Salesforce Applications
- Jobs Board
- Force.com Discussion Boards
- :
- Developer Boards for Force.com and Database.com
- :
- General Development
- :
- What is PageReference ??
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic to the Top
- Bookmark
- Subscribe
- Printer Friendly Page
What is PageRefere nce ??
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
10-12-2011 04:55 PM
Hello Guys ,
I am very new to cloud devlopment.
I am working on some vforce code devlopment.
I need to understand what is pagereference
I have read the documentation but still couldn't clear myself.
So can someone help me eunderstand in a layman terms what is the meaning of
}
public PageReference test() { return something;
Thanks in advance !
Solved! Go to Solution.
Re: What is PageRefere nce ??
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
10-12-2011 09:31 PM
By writing this:
public PageReference test() {
return something;
}you define the return type of the is function which is page reference.
Pagereference is used if you want to redirect the current page to another page.
Refer this documentation or more details : Pagereference Class
In below example you will find we have defined a new Pagereference variable newPage with url of google, and we use that variable for redirecting with returning it.
public PageReference test() {
PageReference newpage = new PageReference('http://www.google.com');
newpage.setRedirect(true);
return newpage;
}

