Toggle Side Panel

  • Home
  • Articles
    • All Articles
    • Blogs
    • Videos
    • Infographics
  • 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
  • Marketplace
  • Advertise With Us
  • Contact Us
  • Discussions
More options
    Sign in Sign up
    • Home
    • Articles
      • All Articles
      • Blogs
      • Videos
      • Infographics
    • 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
    • Marketplace
    • Advertise With Us
    • 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 9 years, 7 months 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?

       

    • 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

    application solution

    Popular Salesforce Blogs

    Salesforce Integration For Business Growth

    Why Salesforce Integration Can Be Your Best Bet for Business Growth

    Blog in Salesforce integration

    Welcome to the age of the Customer. The only riddle that matters here is—how to connect better with them, carve meaningful relationships, address their problems…

    Business Operations, Business Success, Data Visibility, Salesforce Integration, Salesforce Integration Partners
    Rahul Sep 25, 2017
    3,790  Views
    Salesforce B2C Commerce

    Benefits of Salesforce B2C Commerce Cloud

    Blog in Salesforce Cloud Platform

    Benefits of Salesforce B2C Commerce Cloud In today’s age of cloud computing, the importance of everlasting growth for every success-driven business relies on the perfect…

    Automate Process, B2B and B2C Companies, B2C, Buyer Journey, Buying Process
    Innovadel Jul 13, 2022
    3,673  Views

    How to Stop a Journey in Salesforce Marketing Cloud

    Blog in Salesforce Cloud Platform

    It was time-consuming to pause Salesforce Marketing Cloud's progress.  It will provide you with tips to help you save money while still achieving them. Marketing…

    Calendar Days, Communication, Contact Information, Contacts, COVID-19 Disruption
    Hennery cavil Oct 12, 2022
    2,960  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®.

    Try AuditMyCRM - It is a Salesforce CRM Audit tool which comprehensively scans your Salesforce org and gives you the list of errors or warnings you need to take care of.
    We use cookies to enhance your browsing experience. Please see our privacy policy if you'd like more information on our use of cookies.