You need to sign in to do that
Don't have an account?

OutputField displaying as web link
Hey all,
I have the following code snippet in one of my pages:
Code:
<apex:pageBlockTable value="{!displayedIOs}" var="io">
<apex:column headerValue="BC" rendered="{!isBCD}"> <apex:outputField value="{!io.BC__c}"/> </apex:column></apex:pageBlockTable>So my column displays the name of a related object using this code. However, that name is a web link to the actual object. I would like to still display the name, but suppress the link part.
Using code like:
Code:
<apex:column headerValue="BC" rendered="{!isBCD}" value="{!io.BC__c}"/>
only displays the ID of the branded channel.
Given that I am iterating over a set in my pageBlockTable, I can't see a way around this. Does anyone know a way?
outputField will display the way salesforce displays lookups, which is with the name of the object and a link to it. If you want it to display differently, you will need to use outputText.
However in the case of lookups, the id is the value of the outputText. So you would have to do the formatting in your controller, and query for the name based on the id. That's the only way around it that I know of.
Thanks for that Jill.
Yes the the value attribute now works the same as the outputField functionality.
I have resolved this by extending my query to retrieve the related object name, which allowed me to do something like:
which just displays the name of the related object. Thanks for the help