-
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
How to Achieve Faster Salesforce Adoption
Implementing Salesforce is all fine but its real value will be witnessed with Salesforce adoption. After the implementation, the next you have to think of…
What Happens When Salesforce Meets GDPR?
Are you using cloud apps like Salesforce, Google G Suite, Microsoft Office 365??? Then under the GDPR impact, you should know a few things in…
URL Hacking in Salesforce - Episode 1
In Salesforce, the most important and fun interactive way playing with the pre-populated fields is done with the help of URL Hacking. Hey! Hey! Hey!…