setAnchor(anchor)

Sets the URL’s anchor reference to the specified string.

Signature

public System.PageReference setAnchor(String anchor)

Parameters

anchor
Type: String

Return Value

Type: System.PageReference

Example

For example, https://Salesforce_instance/apex/my_page#anchor1.

Previous
Next