You need to sign in to do that
Don't have an account?
Michael Haddad.ax365
Linking to Record in PageBlockTable
Hi
I assume this is simple enough, but don't want to waste time figuring it out. I'm trying to render the Name of a Record as a link to the Record in a column of a pageBlockTable.
I'm using this syntax currently:
Supposing I'm on a na2.salesforce.com, this will output the link as https://na2.salesforce.com/apex/00Q4000000HA9xUEAT. Obviously I don't want the /apex/ in the URL. I know I want to use the current server as the value in outputLink and the Record ID as a param, but how do I merge in the URL of the current server?
Thanks!
I assume this is simple enough, but don't want to waste time figuring it out. I'm trying to render the Name of a Record as a link to the Record in a column of a pageBlockTable.
I'm using this syntax currently:
Code:
<apex:column headerValue="Name"> <apex:outputLink value="{!lead.Id}">{!lead.Name}</apex:outputLink> </apex:column>
Supposing I'm on a na2.salesforce.com, this will output the link as https://na2.salesforce.com/apex/00Q4000000HA9xUEAT. Obviously I don't want the /apex/ in the URL. I know I want to use the current server as the value in outputLink and the Record ID as a param, but how do I merge in the URL of the current server?
Thanks!
but you should be using $Action, which will always find the correct view URL (very helpful for when your view page is overridden).
So instead, do something like this:
Message Edited by jwetzler on 07-31-2008 11:19 AM
<apex:column value="{!cmp.ExtnName}" width="10%" >
<apex:facet name="header" >Description</apex:facet>
</apex:column>
<apex:outputLink value="/{!cmp.ExtnName}"></apex:outputLink>
</apex:pageBlockTable>
Siddharth
I have a similar problem. Maybe since this issue is posted someone will help me?
My code is:
<apex:page standardController="SCMC__Production_Order__c" sidebar="false" showheader="true" recordSetVar="SCMC__Production_Order__c" extensions="TestExtension,TestExtension2">
<html>
<head>
<META http-equiv="refresh" content="60"/>
</head>
</html>
<apex:form >
<apex:pageBlock rendered="True" title="Production Orders">
<apex:pageBlockSection title="Production Orders to Fill">
<apex:pageBlockTable value="{!objlist}" style="width:1220px" var="item">
<apex:column style="width:100px" headerValue="Production Order No." value="{!item.name}"/>
<apex:column style="width:100px" value="{!item.Sales_Order_No__c}"/>
Unfortunately the production order record name is not as link which I can click and open.
Below you can see the screenshot where you can observe that Sales Order No is as a link.
thank you for any help.
You can use something like below:
Regards,
Praveen Venkata.
<apex:page standardController="Case" recordSetVar="Case" tabstyle="Case" sidebar="false" showHeader="false" >
<apex:pageBlock >
<apex:pageBlockTable value="{!case}" var="a" rows="50" >
<apex:column headerValue="Case Number" width="67%">
<apex:outputLink value="/{!a.CaseNumber}">
<apex:outputText value="{!a.CaseNumber}">
</apex:outputText>
</apex:outputLink>
</apex:column>
<apex:column value="{!a.Priority}" />
<apex:column value="{!a.Status}" />
</apex:pageBlockTable>
</apex:pageBlock>
</apex:page>
You can use a extension in which query the cases that you want to display and use that query variable in pageblocktable's value attribute.
Regards,
Praveen Venkata.