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
saransh paliwalsaransh paliwal 

why <apex:outputField value="{!Opportunity.accountname } "/>does it work

sampath goud 4sampath goud 4
Hi Saransh,

Can you please use <apex:outputField value="{!Opportunity.accountId} "/>

Api name for opportunity.account is accountId.

Regards
Sampath
shiv@SFDCshiv@SFDC
Yes it's work with little change, if you are using opportunity as a standard controller and passing the parameter in url (like ...../apex/demoPage?id=006M000000DLTq6)

<apex:page standardController="opportunity">
<apex:form><apex:outputfield value="{! opportunity.Account.Name}"/></apex:form>
</apex:page>