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
Meer SalmanMeer Salman 

output link value?

Hi,

 

This is a bit complicated issue so let me write in steps:

 

1) I created a Custom Object and overide its Detail View and New page by my own VFPages.

 

2) I wanted to have another header tab for the same object so I created a VFPage and add it as a tab by name 'Payment Journal'. It is as similar as the default tab layout of the custom object, however there are few changes.

 

3) In 'Payment Journal' Tab I have a pagetable in which some particular records are shown with their 'Name' in outputlink tag.

 

4) I want to show another VFPage for Detail Veiw when the outputlink is clicked.

 

5) I guess this can be done by giving the value to output link but I am not exactly getting how to give a value in this case.

 

NOTE: Remember I already have overidden the Detail Veiw thus, there are two Detail Veiw pages.

 

Hope it is clear now, Please help me in this I shall be very thankful.

Best Answer chosen by Admin (Salesforce Developers) 
Meer SalmanMeer Salman

It was a bit simple all what to do is simply put the URL

<apex:outputlink action="paste the link here with Page Name?{!accs.Id}&sfdc.override=1">{!accs.Name}</apex:outputlink >

All Answers

SurekaSureka

Hi Meer,

 

You can try the following:

 

<apex:page controller="SampleController">
<apex:form >
<apex:dataList value="{!accList}" var="accs">
<apex:commandLink action="/{!accs.Id}" value="{!accs.Name}"/> --- This renders the account Name as link and on click of the Name user will be redirected to the corresponding Account detail page.
</apex:dataList>
</apex:form>
</apex:page>

 

Hope this helps.

 

Thanks

Sureka

 

Meer SalmanMeer Salman

No dude this is not what I want. I know what are you saying but its not the right answer.

Meer SalmanMeer Salman

It was a bit simple all what to do is simply put the URL

<apex:outputlink action="paste the link here with Page Name?{!accs.Id}&sfdc.override=1">{!accs.Name}</apex:outputlink >

This was selected as the best answer