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 › What is the use of force:recordData in Salesforce lightning component?

    Tagged: Custom Action, force:recordData, Lightning App, Lightning Data Service, Record ID, Salesforce Lightning Component, Salesforce Records, Standard Account

    • Salesforce® Discussions

      What is the use of force:recordData in Salesforce lightning component?

      Posted by Nikita on September 25, 2019 at 11:53 AM

      What is the use of force:recordData in salesforce lightning component?

      Ashutosh replied 6 years, 4 months ago 2 Members · 1 Reply
      • Custom Action
      • force:recordData
      • Lightning App
      • Lightning Data Service
      • Record ID
      • Salesforce Lightning Component
      • Salesforce Records
      • Standard Account
    • 1 Reply
    • Ashutosh

      Member
      September 25, 2019 at 1:30 PM

      A force:recordData component defines the parameters for accessing, modifying, or creating a record using Lightning Data Service. You have granular control on how you want to display or render the data in your custom component.

      We recommend that you use the simpler lightning:recordForm component for accessing, modifying, or creating a record if you don't need a custom layout or custom rendering of record data.

      To load a record, specify its record ID, the component attributes, and a list of fields in your custom component. You can add your custom component to a record home page in the Lightning App Builder, or as a custom action.
      In the following example, the record ID is supplied by the implicit recordId attribute added by the force:hasRecordId interface. A lightning:card component is used to display the record data via accountRecord on the targetFields attribute.

      <aura:component implements="force:hasRecordId,flexipage:availableForRecordHome">
      <aura:attribute name="accountRecord" type="Object"/>
      <aura:attribute name="recordLoadError" type="String"/>

      <force:recordData aura:id="recordLoader"
      recordId="{!v.recordId}"
      fields="Name,Description,Phone,Industry"
      targetFields="{!v.accountRecord}"
      targetError="{!v.recordLoadError}"
      />

      <div>
      <lightning:card iconName="standard:account" title="{!v.accountRecord.Name}" >
      <div class="slds-p-horizontal--small">
      <p class="slds-text-heading--medium"><lightning:formattedPhone title="Phone" value="{!v.accountRecord.Phone}" /></p>
      <p class="slds-truncate"><lightning:formattedText title="Description" value="{!v.accountRecord.Description}" /></p>
      <p class="slds-truncate"> <lightning:formattedText title="Industry" value="{!v.accountRecord.Industry}" /></p>
      </div>
      </lightning:card>
      </div>
      </aura:component>

       

    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

    Metadata Components that Needs to be Deployed Manually in Salesforce

    Metadata Components That Needs To Be Deployed Manually In Salesforce

    Blog in Salesforce Implementation, Salesforce Tutorial

    Hi All, When you want to deploy changes from one Salesforce org to another, you can choose any of the following: Change Sets Force.com Migration…

    AppExchange Apps, AppExchange Component, AppExchange Tools, Change Sets, Component
    PRANAV Apr 3, 2018
    15,800  Views

    B2B Commerce - Move The Needle With Salesforce

    Blog in Salesforce Products

    Market dynamics are rapidly evolving. Manufacturers, wholesalers, and distributors need a scalable and intelligent solution to meet buyer expectations and seize new opportunities. Forward-thinking B2B brands…

    Average Order Value, B2B, B2B Brands, B2B Buyers, B2B Commerce
    DemandBlue Jun 8, 2021
    1,962  Views

    Salesforce Field Service Lightning | All You Need to Know

    Blog in Lightning, Salesforce Tutorial

    FSL  is an extension of Salesforce Service Cloud that helps you and your team members, who work outside the office at clients locations, to manage…

    Appointment Booking, Appointment Booking Community, Appointment Dispatchers, Community Site, Criteria Matching
    Vimera | Andersen Aug 29, 2023
    1,044  Views

    Popular Salesforce Videos

    Customize Salesforce Lightning Home page

    Customize Salesforce Lightning Home page

    Video in Lightning

    In this video Signiforce shows : How to customize the Salesforce Lightning Home page. Update an existing Salesforce lightning home page or create a new…

    Salesforce Training, Salesforce Tutorial, Salesforce Lightning, salesforce, Lightning Components
    Mayra Dec 20, 2022
    1,574  Views
    Salesforce Einstein Search

    Salesforce Einstein Search

    Video in Salesforce Einstein

    Salesforce Einstein Search makes your users more productive by bringing the power of Einstein and AI to Salesforce Search. Einstein Search is Personal, Natural, and…

    salesforce, Salesforce Einstein, AI In Salesforce, Salesforce Admin, Salesforce VIdeos
    Pooja Feb 28, 2020
    3,708  Views
    Salesforce TrailheaDX '18 Opening Keynote - Part 4: Build Apps Fast

    Salesforce TrailheaDX '18 Opening Keynote - Part 4: Build Apps Fast

    Video in Trailhead

    Salesforce TrailheaDX ’18 Opening Keynote – Part 1: Create Connected Customer Experiences TrailheaDX ’18 Opening Keynote – Part 2: Salesforce Platform TrailheaDX ’18 Opening Keynote…

    Salesforce Records, Salesforce Lightning, Salesforce Einstein, Salesforce Trailhead, Lightning App Builder
    Abhay Apr 3, 2018
    1,658  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.