function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Calvin BarrCalvin Barr 

Visualforce page export: reference fields from another object using Looklook field

I've created a Visualforce page to export an MS word version of a contract, based on Standard Controller Contract fields. 

I've created a custom lookup field in the Contract page layout, in order to pull the correponding Opportunity into the Contract page information. What I'm hoping to be able to do is reference fields in the corresponding Opportunity in the visualforce contract export.

I've looked into some table options e.g.

<apex:pageBlockTable value={!list} var="item"> <apex:column value="{!item.Opportunity__r.Status__c}"/> <apex:column value="{!item.Price__c}"/> </apex:pageBlockTable>
The problem is referencing the corrsponding Opportunity. I've also looked into some cross-reference field solutions, but ideally I'd like to avoid adding more custom forumula fields to the Contract layout, just to make the UX easier to manage


Any suggestions would be much appreciated.