• kumaresan.m
  • NEWBIE
  • 0 Points
  • Member since 2013

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 1
    Replies
kumaresan.m
I want to pass some parameters in url to another page with hidden way. so i tried using getheaders() instead of getparameters(). but this was not works. Please help me understand, how to do? i am pasting my code below:

controller of Page 1:
public PageReference wish() {
    pagereference s=new pagereference('/apex/Aboutus');
    s.getHeaders().put('id','1234');
    return s;
}


Construtor of Page 2:

Public aboutus(){
string ss=ApexPages.currentPage().getheaders().get('id');
system.debug('mylog'+ss);
}

in debug log i am getting null during this action..

I need the complete URL of my VF page in controller class (apex class). I have tried the the following solution but to of no use:

 

string x = ApexPages.currentPage();
srting y = ApexPages.currentPage().getURL();

 

Neither of the above methods are giving me the exact URL (e.g., https://c.cs2.visual.force.com/apex/MasterDetail?contractID=2009050010&bu=Media) of the current page that I need to send in an autogenerated email.

 

Regards,
Rao