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
Ashok S 7Ashok S 7 

How to Navigate the page by using <apex:outputlink>

My requirment is when i click on list page that means i created output link for id click that id it will navigate to record view page but it is not displaying values to the record view page
i write vf page and code
vf page
<apex:page controller="list_controller1" sidebar="false" tabStyle="Employee_Information__c">
<apex:form >
<apex:pageBlock title="Employee List">
<apex:pageBlockSection title="Employee Information Displaying ">
<apex:pageBlockTable value="{!empdetails}" var="e">
<apex:column headerValue="ID">
<apex:outputLink value=" =">{!}</apex:outputLink>
<apex:column value="{!e.First_Name__c}"/>
<apex:column value="{!e.Middle_Name__c}"/>
<apex:column value="{!e.Last_Name__c}"/>
<apex:column value="{!e.Date_of_Birth__c}"/>
<apex:column value="{!e.Father_Husband_Name__c}"/>
<apex:column value="{!e.Marital_Status__c}"/>


public class list_controller1

    public Employee_Information__c[] getEmpdetails()
        empdetails = Database.query(query);
        return empdetails;

    Employee_Information__c[] empdetails;
    string query = 'select id,First_Name__c,Middle_Name__c,Last_Name__c,Date_of_Birth__c,Father_Husband_Name__c,Marital_Status__c from Employee_Information__c';



please help me any one
User-added imageUser-added image

in the first image i click the id link it will navigate to secong image but here values are not displaying for fields .
please help me
any one
Best Answer chosen by Ashok S 7
Make sure there are no spaces in the link. It should be: 

and test it with Development mode off.

All Answers

Hello Ashok,

You need to specify {!e.Id} instead of in the value attribute of the output link.

Please replace the following line
<apex:outputLink value=" =">{!}</apex:outputLink>
With following line.
<apex:outputLink value=" = {!}">{!}</apex:outputLink>

Let me know if you need any help. I will more than happy to help you.
Ashok S 7Ashok S 7
when i replace your code it will redirect to the i created vie page  but values are not coming
Make sure there are no spaces in the link. It should be: 

and test it with Development mode off.
This was selected as the best answer
Ashok S 7Ashok S 7
Thanks for helping
Hello Askhok
here i have one quesiton
<apex:outputLink value=" = <b></b>">{!}</apex:outputLink>

here  is sandbox URL ....if i move these changes to production , it wont work, becuase URL is differet like https://c.ap2. XXX. XXX.

so, how can we maintain production url / dynamic URL , depends on sandbox ?

pls let me know ...Thanks Ram

i got solutioon............pls ignore my request ..Thanks