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
SimrinSimrin 

get record id

 
<apex:pageblocktable value="{!list}" var="item">
    <apex:column>RECORDID
      <apex:outputLink value="{!item.Name}">{!item.Name}</apex:outputLink>
    </apex:column>       
</apex:pageblocktable>
 
public with sharing class customClass{

public List<StandardClass> list{get;set;}

 public customClass(){
        
        list = [Select Name, RECORDID
                     From ProfileSkill];
        
        }
}

I want to have a link which will redirect user to record type.

I do not know, what paramenter i can use for  RECORDID
Best Answer chosen by Simrin
AMIT KAMBOJAMIT KAMBOJ
Hi Simrin
Please try to use below updated code. If this resolves the issue then please mark this answer as solution.
<apex:pageblocktable value="{!plist}" var="item">
<apex:column headerValue="RECORDID">
      <apex:outputLink value="/{!item.Id}">{!item.Name}</apex:outputLink>
    </apex:column>       
</apex:pageblocktable>



public with sharing class customClass{

public List<ProfileSkill> plist{get;set;}

 public customClass(){
        
        plist = [Select Name, Id From ProfileSkill];
        
        }
}

 

All Answers

Michael VerhovskiMichael Verhovski
"list" is reserved keyword, you cannot use it as identifier.

Have you tried to execute your SOQL query? Perhaps you should try Id instead of RECORDID
AMIT KAMBOJAMIT KAMBOJ
Hi Simrin
Please try to use below updated code. If this resolves the issue then please mark this answer as solution.
<apex:pageblocktable value="{!plist}" var="item">
<apex:column headerValue="RECORDID">
      <apex:outputLink value="/{!item.Id}">{!item.Name}</apex:outputLink>
    </apex:column>       
</apex:pageblocktable>



public with sharing class customClass{

public List<ProfileSkill> plist{get;set;}

 public customClass(){
        
        plist = [Select Name, Id From ProfileSkill];
        
        }
}

 
This was selected as the best answer
SimrinSimrin
Id worked, Thank you Michael and Amit