Is it possible to get the Id of an object in a Visualforce page without a controller extension?
Attribution to: greenstork
Possible Suggestion/Solution #1
You can do this using the merge field syntax. For example if you are using the Opportunity
standard controller you can use {!opportunity.Id}
in your Visualforce page.
Attribution to: Alex Tennant
Possible Suggestion/Solution #2
You just need to put the object API name and .Id in a formula expression holder? such as:
"{!Opportunity.Id}"
which you can put anywhere in a Visualforce page?
Attribution to: Simon Lawrence
This content is remixed from stackoverflow or stackexchange. Please visit https://salesforce.stackexchange.com/questions/30374