currently I send one Id in the URL to my other controller but now I have to send another value within the same URl to my other controller , how can I add the second value to this
PageReference opptyPage = new PageReference('/apex/PBXOrdering');
opptyPage.getParameters().put('id', Opportunity.id);
opptyPage.setRedirect(true);
what I wish,
PageReference opptyPage = new PageReference('/apex/PBXOrdering');
opptyPage.getParameters().put('id', Opportunity.id + 'xyz', currenId);
opptyPage.setRedirect(true);
also how do I receive both Id's individual for my two different variables?
Best Answer
Simply add both to the map:
On the page where the data is retrieved from, just read the parameters back using the get method: