Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8904113
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T02:02:25+00:00 2026-06-15T02:02:25+00:00

I am trying to implement a cancel button in a visualforce page which should

  • 0

I am trying to implement a cancel button in a visualforce page which should lead to the previous page.
The first page (welcome) has two links link1 and link2 based on the link clicked a different section of the landing visualforce page is rendered.
I pass parameters using apex:param in the welcome page based on the link clicked.
But, the value I receive in the landing page is always null.

The landing page has the cancel button which should lead to the welcome page. When cancel is clicked only the query parameters passed in the URL vanish and remains on the same page.

What am I missing here? Please help as I am new to visualforce 🙂

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T02:02:27+00:00Added an answer on June 15, 2026 at 2:02 am

    I strongly suspect you don’t even need setRedirect here. Or action method in controller for that matter.

    First experiment with something simple:

    <apex:commandButton action="/apex/welcomePage?param1=foo&param2=bar" 
        immediate="true" 
        value="Cancel" />
    

    Immediate skips any kind of validations etc you might have. Action can be a normal link, something more magical like URLFOR() function or the merge field that links to your controller’s action method (plus certain standard actions like {!save} are available if you have standardController on the page.

    There are couple of questions similar to this one on Salesforce-dedicated site StackExchange site. Check https://salesforce.stackexchange.com/a/4242/799 and https://salesforce.stackexchange.com/a/4707/799 (if you want to see bit more advanced example of URLFOR).


    As to why this might be the case – maybe you could post the welcome page’s controller (especially constructor). Are you reading the values from the PageReference or do you expect parameter setters to fire on the initial request? Do both pages share same controller or controller extension? Generally speaking it’s a quite big topic 🙂

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to implement JSF table with delete button. This is the JavaScript which
I'm trying implement A* Start path finding in my games(which are written with JavaScript,
Trying to implement LoaderManager + CursorLoader. In onFinish method adapter should swap its cursor
I'm trying to implement a UISearchBar within a UITableView , which behaves like the
I'm trying to implement IP address validation on my page. I have a test
I am trying to handle the 'Cancel' button in my property pages (wizard) and
I'm trying to implement multistage animation using UIViewAnimationOptionBeginFromCurrentState to allow the user to cancel
i'm currently trying to implement UPLOADIFY to a wordpress template page. I implemented it
It's my first time using uploadify and I'm trying to implement it into a
I am trying to implement try again/cancel dialog box in windows 8. The dialog

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.