Toggle Side Panel

  • Blogs
  • Consultants
    • Salesforce Product Expertise
      • Top Salesforce ConsultantsTop Salesforce Consultants
      • Marketing Cloud ConsultantsMarketing Cloud Consultants
      • Service Cloud ConsultantsService Cloud Consultants
      • Experience Cloud ConsultantsExperience Cloud Consultants
      • Analytics Cloud ConsultantsAnalytics Cloud Consultants
    • Salesforce Industry Expertise
      • Non-Profit Cloud ConsultantsNon-Profit Cloud Consultants
      • Financial Service Cloud ConsultantsFinancial Service Cloud Consultants
      • Health Cloud ConsultantsHealth Cloud Consultants
      • Commerce Cloud ConsultantsCommerce Cloud Consultants
      • Manufacturing Cloud ConsultantsManufacturing Cloud Consultants
    • Salesforce Experts by Location
      • USATop Salesforce Consultants in USA
      • IndiaTop Salesforce Consultants in India
      • AustraliaTop Salesforce Consultants in Australia
      • United KingdomTop Salesforce Consultants in UK
      • CanadaTop Salesforce Consultants in Canada
  • Webinars
  • Contact Us
  • Discussions
More options
    Sign in Sign up
    • Blogs
    • Consultants
      • Salesforce Product Expertise
        • Top Salesforce ConsultantsTop Salesforce Consultants
        • Marketing Cloud ConsultantsMarketing Cloud Consultants
        • Service Cloud ConsultantsService Cloud Consultants
        • Experience Cloud ConsultantsExperience Cloud Consultants
        • Analytics Cloud ConsultantsAnalytics Cloud Consultants
      • Salesforce Industry Expertise
        • Non-Profit Cloud ConsultantsNon-Profit Cloud Consultants
        • Financial Service Cloud ConsultantsFinancial Service Cloud Consultants
        • Health Cloud ConsultantsHealth Cloud Consultants
        • Commerce Cloud ConsultantsCommerce Cloud Consultants
        • Manufacturing Cloud ConsultantsManufacturing Cloud Consultants
      • Salesforce Experts by Location
        • USATop Salesforce Consultants in USA
        • IndiaTop Salesforce Consultants in India
        • AustraliaTop Salesforce Consultants in Australia
        • United KingdomTop Salesforce Consultants in UK
        • CanadaTop Salesforce Consultants in Canada
    • Webinars
    • Contact Us
    • Discussions
    Close search

    Activity › Forums › Salesforce® Discussions › How to display Account Owner name in Visualforce Page?

    Tagged: Account, Custom Controller, Input Field, Salesforce Apex, Salesforce Visualforce, Salesforce Visualforce Page

    • Salesforce® Discussions

      How to display Account Owner name in Visualforce Page?

      Posted by PRANAV on July 12, 2016 at 1:41 PM

      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 :

      owner

      PRANAV replied 10 years, 1 month ago 3 Members · 4 Replies
      • Account
      • Custom Controller
      • Input Field
      • Salesforce Apex
      • Salesforce Visualforce
      • Salesforce Visualforce Page
    • 4 Replies
    • Shekhar Gadewar

      Member
      July 12, 2016 at 1:51 PM

      Have u passed any account id for this page?

       

    • [adinserter block='9']
    • PRANAV

      Member
      August 4, 2016 at 6:30 AM

      Hi Shekhar,

      Yes,  I passed an account id ,the vf page shows the details of that particular account shown in image below.

      accid

      But I want to insert new account through my vf page for that I want to show account owner name as shown in default new account page . Please give some suggestion on it.

      Thanks

    • Ajit

      Member
      August 10, 2016 at 12:18 PM

      Hi Pranav,

       

      Do you have tried this

      <apex:outputfield value=”{! Account.Ownerid}”/>

      set the value of Account.Ownerid in you controller with id of current user in the constructor do let me know if it worked or not

    • PRANAV

      Member
      August 11, 2016 at 6:13 AM

      Hi Ajit,

      Yes , it works perfectly on setting the value of Account.Ownerid in the controller .

      Thanks

    Log In to reply.

    • Public
    • All Members
    • My Connections
    • Only Me
    • Public
    • All Members
    • My Connections
    • Only Me
    • Public
    • All Members
    • My Connections
    • Only Me

    Popular Salesforce Blogs

    Why Should Organizations Consider Outsourcing Their Salesforce Development?

    Blog in Salesforce Consultant

    As a top-rated CRM, Salesforce can be leveraged by businesses to increase their sales and productivity. Besides helping organizations manage their business processes, the cloud-based…

    Business Process, Client Relationship, Cloud Based CRM, Cost Cutting, Cost Savings
    Girikon Apr 13, 2022
    2,544  Views
    saas sales

    How to Run Customer Success and SaaS Sales in Salesforce

    Blog in Salesforce

    If you sell physical products using a traditional sales model, a Customer Relationship Management (CRM) platform like Salesforce should deliver all the value you need…

    Automation, Business Intelligence, Business Intelligence Platform, CRM Platform, CRM Solutions
    Akita Feb 29, 2024
    3,432  Views
    Salesforce Lightning

    Why Should You Consider Migrating To Salesforce Lightning In 2022?

    Blog in Lightning

    Salesforce has been in the industry for over two decades and has already carved its niche in the market. The CRM platform has been consistent…

    app development, Applications, Aura Framework, Business Goals, Business Process
    Manish Pandey Jan 27, 2022
    3,739  Views
    Footer Forcetalks logo

    support@forcetalks.com

    • twitterx

    Quick Links

    Advertise with Us

    Salesforce® Articles

    Dreamforce 2023

    Top Salesforce® Bloggers 2023

    Top Salesforce Consultants

    Get Listed

    Company

    Contact Us

    About Us

    Privacy Policy

    Terms & Conditions

    InsightHub

    Salesforce Blogs

    Salesforce Videos

    Salesforce Groups

    Salesforce Jobs

    © 2026 - Forcetalks ● All Rights Reserved

    Salesforce® is a trademark of Salesforce® Inc. No claim is made to the exclusive right to use “Salesforce”. Any services offered within the Forcetalks website/app are not sponsored or endorsed by Salesforce®.

    We use cookies to enhance your browsing experience. Please see our privacy policy if you'd like more information on our use of cookies.