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.

Setting Query String Parameters in Links

You can set query string parameters in links to pages by constructing the link URL manually, or by using <apex:param> tags within the <apex:outputLink> tag. For example, both of the following examples create identical links to an external page:

1<apex:outputLink value="http://google.com/search?q={!account.name}">
2    Search Google
3</apex:outputLink>
1<apex:outputLink value="http://google.com/search">
2    Search Google
3    <apex:param name="q" value="{!account.name}"/>
4</apex:outputLink>

The latter method, which uses <apex:param> tags instead of manually creating the URL, is preferable for stylistic reasons.

In addition to <apex:outputLink>, use <apex:param> to set request parameters for <apex:commandLink>, and <apex:actionFunction>.

Note