Get Object from ID in VisualForce rerendered page

820 Views Asked by At

I am working with visualforce. Is there a way to get the fieldname from the id in the rerendered section of the visualforce page. {!$CurrentPage.parameters.cid} gives me the id. Suppose that cid has the id of the contact object. How can i display certain fields of the contact object in the outputpanel. I tried the but it gave whole detail. I only want certain fields.

1

There are 1 best solutions below

0
On

Hope you are referencing this documentation in your work. $CurrentPage.parameters.parameter_name is a way of getting query string parameters in Visuaforce and there is nothing to do with that for altering the fields you need in the Contact section.

If you are using <apex:detail /> for the Contact section, what you can do is update your Contact object detail page layout as you need.