+ Start a Discussion
PilkoTechPilkoTech 

Cross-Object Fields in VF?

Hi all:

 

The organization I am working for is a reseller of products. For some opportunities, they need to send an inquiry to the manufacturer to get a custom quote. They have defined a custom field in the Opportunity called Inquiry_Sent_To__c that references a specific Contact.

 

I'm working on developing a VisualForce page to automatically send an email to that manufacturer from the Oppt'y. I'm using the Oppt'y Standard Controller. I've tried {!Inquiry_Sent_To__r.Email} and I get the error  "Unknown property 'OpportunityStandardController.Inquiry_Sent_to__r}".  When I try {!Opportunity.Inquiry_Sent_To__c.Email} I get the error "Unknown property 'String.Email".

 

What am I missing here? Thanks.

Best Answer chosen by Admin (Salesforce Developers) 
ahab1372ahab1372

combine the two ways you have tried:

{!Opportunity.Inquiry_Sent_To__r.Email} 

All Answers

ahab1372ahab1372

combine the two ways you have tried:

{!Opportunity.Inquiry_Sent_To__r.Email} 

This was selected as the best answer
PilkoTechPilkoTech

Thanks. I missed that one.