You need to sign in to do that
Don't have an account?
d3developer
Get Id from Standard Object in Visualforce Page
So I think this may also be a n00b question but I can't seem to figure out how to display the id of a standard object in a Visualforce page.
All I want is something like this:
<apex:page standardController="Contact"> {!object.id} </apex:page>
Any ideas? I know I could use a custom controller as an extension but would prefer not to.
I think it is {!Contact.Id}
All Answers
I think it is {!Contact.Id}
i dont think object dont have ids the records of the object have ids.
Thanks aalbert, works like a charm.
<apex:page standardController="contact" recordSetVar="contact">
<apex:pageBlock title="The id of the contact Standard object">
<apex:pageBlockTable value="{!contact}" var="a">
<apex:column value="{!a.id}"/>
<apex:column value="{!a.name}"/>
</apex:pageBlockTable>
</apex:pageBlock>
</apex:page>
If u don't use the recordSetVar then data is not showing because this contains all data into record set varible after that showing on the visual force page.
Thanks
Mukesh