You need to sign in to do that
Don't have an account?
getparameters.get is returning null value
Hi,
I am very new to salesforce trying to create some space for myself.
In my logincontroller once after the user login is succeeded I am setting the name of the user like below and redirecting to mainmenu page.
PageReference pageRef = Page.mainmenu;
system.debug('in login page***'+userlst.get(0).name);
pageRef.getParameters().put('usrnm',userlst.get(0).name);
return Page.mainmenu;
And I am trying to retrieve the same in "mainmenu" page controller using below
public mainmenuController(){
this.strname=Apexpages.currentPage().getParameters().get('usrnm');
system.debug('****in menu***'+strname);
}
however in mainmenucontroller the value of "strname" is printing as null
any ideas/suggestions are most welcome.
I think I've spotted it - you set up the page reference but then return a different one.
Change:
to:
All Answers
Does the parameter appear on the URL for the mainmenu?
no. it is not
I think I've spotted it - you set up the page reference but then return a different one.
Change:
to:
It worked..Thank you bob........