0

ok i have this:

<apex:column headerValue="Provider">
  <apex:outputLink target="_blank" value="/{!o.WhoId}">{!o.WhoId}</apex:outputLink>
</apex:column>

this returns me this html:

<a href="https://cs14.salesforce.com/003i000000Rs7wgAAB" target="_blank">003i000000Rs7wgAAB</a>

I need this html:

<a href="https://cs14.salesforce.com/003i000000Rs7wgAAB" target="_blank">Lead Name</a>

the object in question 'o' is a task.

lastly if i change my code to this:

<apex:column value="{!o.WhoId}"/>

I get the appropriate response, but i dont get the target="_blank" i need

1 Answer 1

1

You can use {!o.Who.Name} to output the name of the record.

5
  • Content cannot be displayed: SObject row was retrieved via SOQL without querying the requested field: Task.Who. Commented Jul 28, 2014 at 18:26
  • and if i query it like this: Select t.Id, t.Description, t.Who, t.Subject, t.WhoId From Task Commented Jul 28, 2014 at 18:26
  • i get this error: Save error: No such column 'Who' on entity 'Task'. If you are attempting to use a custom field Commented Jul 28, 2014 at 18:26
  • 1
    You need to query e.g. t.who.name to get the data you want. You can't just query t.who because it's a relationship field.
    – sfdcfox
    Commented Jul 28, 2014 at 19:16
  • you are the man ! thumbs up 4 u Commented Jul 28, 2014 at 19:35

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .