-
How to display Account Owner name in Visualforce Page?
How to display Account Owner name in Visualforce page?
I wrote this code but only account owner label is shown not the name.
<apex:page Controller="AccountInsert" showHeader="true" sidebar="true">
<apex:form >
<apex:pageBlock title="Account Edit">
<apex:pageMessages /><apex:pageBlockButtons >
<apex:commandButton action="{!save}" value="Save"/>
<apex:commandButton action="{!cancel}" value="Cancel"/>
</apex:pageBlockButtons><apex:pageBlockSection columns="2" title="Account Information" collapsible="false">
<apex:outputfield value="{! Account.Ownerid}"/>
<apex:inputField value="{! Account.Name}"/>
<apex:inputField value="{! Account.ParentId}"/>
<apex:inputField value="{! Account.AccountNumber}"/>
<apex:inputField value="{! Account.Site}"/>
<apex:inputField value="{! Account.Type}"/>
<apex:inputField value="{! Account.Industry}"/>
<apex:inputField value="{! Account.AnnualRevenue}"/>
<apex:inputField value="{! Account.Match_Billing_Address__c}"/>
<apex:inputField value="{! Account.Rating}"/>
<apex:inputField value="{! Account.Phone}"/>
<apex:inputField value="{! Account.Fax}"/>
<apex:inputField value="{! Account.Website}"/>
<apex:inputField value="{! Account.TickerSymbol}"/>
<apex:inputField value="{! Account.Ownership}"/>
<apex:inputField value="{! Account.NumberOfEmployees}"/>
<apex:inputField value="{! Account.Sic}"/>
</apex:pageBlockSection><apex:pageBlockSection columns="2" title="Address Information" collapsible="false">
<apex:inputField value="{! Account.BillingStreet}"/>
<apex:inputField value="{! Account.BillingCity}"/>
<apex:inputField value="{! Account.BillingState}"/>
<apex:inputField value="{! Account.BillingPostalCode}"/>
<apex:inputField value="{! Account.BillingCountry}"/>
<apex:inputField value="{! Account.ShippingStreet}"/>
<apex:inputField value="{! Account.ShippingCity}"/>
<apex:inputField value="{! Account.ShippingState}"/>
<apex:inputField value="{! Account.ShippingPostalCode}"/>
<apex:inputField value="{! Account.ShippingCountry}"/>
</apex:pageBlockSection><apex:pageBlockSection columns="2" title="Additional Information">
<apex:inputField value="{! Account.CustomerPriority__c}"/>
<apex:inputField value="{! Account.SLA__c}"/>
<apex:inputField value="{! Account.SLAExpirationDate__c}"/>
<apex:inputField value="{! Account.SLASerialNumber__c}"/>
<apex:inputField value="{! Account.NumberofLocations__c}"/>
<apex:inputField value="{! Account.UpsellOpportunity__c}"/>
<apex:inputField value="{! Account.Active__c}"/>
</apex:pageBlockSection><apex:pageBlockSection columns="1" title="Description Information">
<apex:inputField value="{! Account.Description}"/>
</apex:pageBlockSection></apex:pageBlock>
</apex:form>
</apex:page>Image for reference :
Log In to reply.
Popular Salesforce Blogs
![](https://images.forcetalks.com/wp-content/uploads/2019/05/23075439/FT-Banners-5-121.jpg)
Why all Salesforce Users Should Integrate Their Systems
A common scenario with organizations using Salesforce is having a scenario where employees from different departments, are not able to access the same accurate, real-time…
![](https://images.forcetalks.com/wp-content/uploads/2022/06/10154949/sa_16548758768%20Salesforce%20certificates%20New%202%202-1024x576.png)
How to Get 8 Salesforce Certificates in Less Than a Year?
I believe that for a Salesforce developer there is nothing more important than the practice of working on different projects, with different stacks We asked…
![Accounts & Contacts](https://images.forcetalks.com/wp-content/uploads/2021/10/29174116/Accounts-Contacts.jpg)
Understanding Accounts & Contacts for Sales Process | Salesforce Guide
Accounts & Contact for Salesforce Classic Define your sales process. Accounts are companies that we are doing business with. On the other hand, Contacts represent…