Find your content:

Search form

You are here

Accessing records via URL in Visualforce and sites

 
Share

I have a requirement to show the records to the user using my visualforce page in sites based on the url string.

Say for example my custom object name is position.

If a user enters : https://siteprefix.sitedomain/MyPositions/1234 (or) https://siteprefix.sitedomain/MyPositions/4567

MyPositions is my VF Page and it has necessary UI elements to show the details of the given record using the controller bound to it.

Is it possible to access the position record with Name field value as 1234 or 4567 and show it based on the above given URL?

as of now am doing like this

https://siteprefix.sitedomain/MyPositions?id=1234 (or) https://siteprefix.sitedomain/MyPositions?id=4567


Attribution to: Sathya

Possible Suggestion/Solution #1

You can do this using the Site.UrlRewriter Interface.


Attribution to: Daniel Hoechst
This content is remixed from stackoverflow or stackexchange. Please visit https://salesforce.stackexchange.com/questions/1896

My Block Status

My Block Content