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, 2 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

    How Much Does a Salesforce Implementation Cost?

    Blog in Salesforce Implementation

    Introduction Before moving ahead, let's first understand what CRM is and why it is important for businesses, as Salesforce is a CRM software.  CRM is…

    Business Needs, Business Process, Businesses, Cheaper Implementations, Client Retention
    Cyntexa Apr 30, 2021
    7,651  Views
    vs code

    How to Setup Salesforce on VS Code - Developer Guide

    Blog in Coding and Scripting, Others, Salesforce

    Following are the steps to setup Salesforce on VS Code: Install VS code in your system using this link "https://code.visualstudio.com/download". Install Salesforce CLI using the…

    API, CLI, Developer Guide, Salesforce, Salesforce Apex
    Anuj Jun 8, 2020
    7,274  Views

    10 Steps to a Sustainable Salesforce Org

    Blog in Others

    Salesforce is one of the most widely used CRM platforms in the world, enabling organizations to streamline their sales, marketing, and customer service operations. However,…

    Best Practices, Carbon Footprint, Cost Savings, Data-driven Decisions, Digital Transformation
    DB Jul 2, 2024
    507  Views

    Popular Salesforce Videos

    Skills for Salesforce Field Service | Optimize Customer Service for Businesses | Salesforce Webinar

    Skills for Salesforce Field Service | Optimize Customer Service for Businesses | Salesforce Webinar

    Video in Salesforce Field Service Platform

    One way to optimize customer service operations is by having the right technician for the right job. How? Skills for Salesforce Field Service is the…

    Salesforce Tutorial, salesforce, Salesforce Webinar, Salesforce Field Service Platform, Salesforce Field Service
    AblyPro Jul 4, 2024
    656  Views
    Objects and Tabs in Salesforce

    Objects and Tabs in Salesforce

    Video in Salesforce Admin

    Watch this video to learn all about Objects and Tabs in Salesforce. If you have any doubts or concerns please let us know in the…

    Salesforce Training, Salesforce Tutorial, Salesforce Objects, Learn Salesforce, Salesforce Video
    CRS Feb 1, 2022
    1,573  Views
    Translate/Rename Custom Field Labels in Salesforce

    Translate/Rename Custom Field Labels in Salesforce

    Video in Others, Salesforce Stories

    Watch the short video instruction of how you can translate or rename custom field labels, fieldsets, buttons, etc. that come with installed managed packages in…

    Salesforce Training, salesforce, Salesforce Video, Salesforce Learning, Fieldsets
    Lisa Jul 23, 2020
    2,226  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.