function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Mohan sharmaMohan sharma 

How to get other then id field on visualforce page ?

I am getting id in pageblocktable  but i am not able to get name field .
Best Answer chosen by Mohan sharma
Deepak Kumar ShyoranDeepak Kumar Shyoran
I think you are trying to iterate a Map on V.F. There is a different way to iterate Map on VF below is an Example which will help you in iterating a Map on V.F.

// This hold Obj API name as key and Object as Value
public Map<String,SObject> sobjMap { get; set;}

<apex:repeat value="{!sobjMap}" var="key" >
 {!objName[key]
</apex:repeat>

 

All Answers

Deepak Kumar ShyoranDeepak Kumar Shyoran
You can get other field in same way as you are getting Name field.
Mohan sharmaMohan sharma
HI Deepak, I want to get name or other field from controller this time i am getting only id field. And i want all field from Map<String, Sobject>.
Deepak Kumar ShyoranDeepak Kumar Shyoran
I think you are trying to iterate a Map on V.F. There is a different way to iterate Map on VF below is an Example which will help you in iterating a Map on V.F.

// This hold Obj API name as key and Object as Value
public Map<String,SObject> sobjMap { get; set;}

<apex:repeat value="{!sobjMap}" var="key" >
 {!objName[key]
</apex:repeat>

 
This was selected as the best answer