You need to sign in to do that
Don't have an account?
Bryn Jones
Get Opportunity Contact Name on VF Page
SF DEV's
I am trying to retrieve the Full Name of an Opportunities Contact in a VF page. I have {!Opportunity.Opportunity_Contact__r} right now but it brings up the Contact ID instead. What am I doing wrong or what do I need to do?
Thanks,
Bryn Jones
I am trying to retrieve the Full Name of an Opportunities Contact in a VF page. I have {!Opportunity.Opportunity_Contact__r} right now but it brings up the Contact ID instead. What am I doing wrong or what do I need to do?
Thanks,
Bryn Jones
{!Opportunity.Opportunity_Contact__r.Name}
Try {!Opportunity.Opportunity_Contact__r.FirstName & ' ' & Opportunity.Opportunity_Contact__r.LastName}
'__r' is for object relationships and it allows you to retrieve data from the related record, but you also need to mention the field you need from that record.
Hope it helps
When using the field__r.name you would get the value on the "name" standar field.
Check out the standar fields in contact and just bring them with the "object.searchfield__r.fieldnameoftherelatedobject"