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

    Salesforce Apex Test Class

    Get Started with Salesforce Apex Test Class | The Developer Guide

    Blog in Salesforce Apex, Salesforce Training

    Testing is a crucial part of the Salesforce development life cycle. Whenever we do code in Salesforce, we cannot send it directly to the production.…

    Apex Test Class, Apex Triggers, Best Practices, Bugs, Bulk Tests
    Romil Singh Sep 2, 2021
    6,439  Views
    Steps to Install the Force.com IDE Plug-In in Eclipse

    Steps to Install the Salesforce Force.com IDE Plug-In in Eclipse

    Blog in Salesforce integration

    Force.com IDE can be installed into your existing Eclipse distribution. Following are the prerequisite to install Force.com IDE on your workstation : Don’t forget to check…

    Eclipse IDE, Force.com Debugger, Force.com IDE, Force.com Lightning Support., Force.com Plugin
    Ratnakar Mar 13, 2018
    44,911  Views

    Salesforce App Development: Best Practices

    Blog in Others

    One of the great things about Salesforce is its infinite customization options. Not only can you tailor it to suit your unique business needs but…

    app development, App Distribution, App Installation, App Release, AppExchange
    Twistellar Oct 27, 2023
    1,560  Views

    Popular Salesforce Videos

    Introduction to Salesforce CTA Exam

    Introduction to Salesforce CTA Exam

    Video in Salesforce Certifications

    The average salary for a Technical Architect is $118,324 per year in the United States. Do you also want to become Technical Exam by cracking…

    Salesforce Training, Salesforce Tutorial, Salesforce Certification, salesforce, Salesforce Video
    S2 Jan 25, 2022
    1,925  Views
    Stay Focused with Salesforce Customer 360

    Stay Focused with Salesforce Customer 360

    Video in Salesforce Products

    It's never easy to stay focused when distractions are pouring in from work, home, and everywhere in between. That’s why Salesforce Customer 360 helps business…

    Salesforce Products, Salesforce Tutorial, Salesforce Video, Customers, Salesforce Customer 360
    Prafull Dec 22, 2020
    1,652  Views
    Salesforce Tower San Francisco Virtual Community Tour

    Salesforce Tower San Francisco Virtual Community Tour

    Video in Salesforce Stories

    Wherever you are around the world, join us for a virtual tour of Salesforce Tower San Francisco, our global headquarters. Together, we’ll take a walk…

    Salesforce Training, Salesforce Tutorial, Salesforce Tower, Salesforce Video, Salesforce Learning
    Nauman Feb 5, 2021
    2,515  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

    © 2025 - 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.