Newer Version Available

This content describes an older version of this product. View Latest

getAnchor()

Returns the name of the anchor referenced in the page’s URL. That is, the part of the URL after the hashtag (#).

Signature

public String getAnchor()

Return Value

Type: String

Instances of PageReference returned by ApexPages.currentPage() have a null anchor attribute, because URL fragments are not sent to the Salesforce server during a request.

Note