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 set default value in <lightning:select> in Salesforce?

    Tagged: Account ID, Aura Attribute, Controller, Lightning Account Controller, Salesforce Lightning

    • Salesforce® Discussions

      How to set default value in <lightning:select> in Salesforce?

      Posted by Yogesh on December 10, 2019 at 7:20 AM

      I have to set default value in <lightning:select>.

      Deepak replied 6 years, 3 months ago 2 Members · 1 Reply
      • Account ID
      • Aura Attribute
      • Controller
      • Lightning Account Controller
      • Salesforce Lightning
    • 1 Reply
    • Deepak

      Member
      December 10, 2019 at 2:07 PM

      <aura:application extends="force:slds" controller="LightningAccountController">
      <aura:attribute name="accounts" type="Account[]" />
      <aura:handler name="init" value="{!this}" action="{!c.doInit}" />

      <lightning:select label="Choose 1" name="a_opt" aura:id="a_opt" onchange="{!c.change}">
      <aura:iteration items="{!v.accounts}" var="account">
      <option value="{!account.Id}">{!account.Name}</option>
      </aura:iteration>
      </lightning:select>
      </aura:application>

    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

    The Most Awaited Feature “List Contains” is Now Available – Spring’18

    Blog in Salesforce Apex

    Yes, you heard it right! Now no more replicating List to Set. You can directly use contains over List. Salesforce Spring ’18 Release contains(listElement): Same…

    Collection, Contains, IndexOf, List in Salesforce, listElement
    Arshad Jan 11, 2018
    17,035  Views
    An Introduction to%0ASalesforce Wave Analytics

    An Introduction to Salesforce Wave Analytics

    Blog in Salesforce Wave Analytics

    Analytics is secure, trustable, scaled and also it is responsive to access on every media screen. It can be easily used in org to handle…

    Dataset, Dataset in Salesforce, ERP, Salesforce Organization, Salesforce Wave Analytics
    Satyakam Jan 9, 2018
    5,483  Views

    How Salesforce Marketing Cloud Services Can Help Grow Your Business

    Blog in Others

    In today’s digital-first world, businesses are constantly searching for innovative ways to connect with their customers. Salesforce Marketing Cloud (SFMC) is a leading customer relationship…

    Harshy Aug 1, 2025
    197  Views

    Popular Salesforce Videos

    How to Trigger the Lead Assignment Rule from Flow Builder

    How to Trigger the Lead Assignment Rule from Flow Builder

    Video in Salesforce Training

    In this video, we will talk about how to trigger the lead assignment rule from the flow builder Salesforce. Here is the timestamp for your…

    Salesforce Training, Salesforce Tutorial, salesforce, Apex, Salesforce Learning
    Abhishek Feb 7, 2022
    4,713  Views
    Is the Salesforce Marketing Cloud the Future For Business?

    Is the Salesforce Marketing Cloud the Future For Business?

    Video in Salesforce Automation

    As the market changes, one needs to keep up with the times. Companies are interested in Salesforce Marketing Cloud because it gives them a competitive…

    Salesforce Training, Salesforce Tutorial, salesforce, Salesforce Marketing Cloud, Salesforce Video
    Cyntexa Jan 12, 2023
    1,220  Views
    How to Focus on Report Results in Salesforce Console | Salesforce

    How to Focus on Report Results in Salesforce Console | Salesforce

    Video in Others, Salesforce Stories

    When you work with reports in a fast-paced Salesforce Console environment, every extra click or focus change can slow you down. Now a streamlined console…

    Salesforce Reports, salesforce, Salesforce Video, Salesforce Learning, Report Results
    Rupal Kakkar Sep 16, 2020
    1,654  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.