Note: This release is in preview. Features described here don’t become generally available until the latest general availability date that Salesforce announces for this release. Before then, and where features are noted as beta, pilot, or developer preview, we can’t guarantee general availability within any particular time frame or at all. Make your purchase decisions only on the basis of generally available products and features.

getParameters()

Returns a map of the query string parameters for the PageReference; both POST and GET parameters are included. The key string contains the name of the parameter, while the value string contains the value of the parameter.

Signature

public Map<String, String> getParameters()

Return Value

Type: Map<String, String>

Usage

This map can be modified and remains in scope for the PageReference object. For instance, you could do:

1PageReference.getParameters().put('id', myID);

Parameter keys are case-insensitive. For example:

1System.assert(
2    ApexPages.currentPage().getParameters().get('myParamName') ==
3    ApexPages.currentPage().getParameters().get('myparamname'));