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

    Finding the Ideal Salesforce Managed Services Provider for Your Business Success

    Blog in Salesforce Consultant

    In today’s rapidly evolving digital landscape, businesses need agile, scalable, and efficient solutions to stay ahead. Salesforce, as a leading CRM platform, provides the flexibility…

    Certified Salesforce Experts, managed services provider, Salesforce Automation, Salesforce Best practices, Salesforce Business Growth
    TechForce Sep 18, 2024
    1,514  Views

    Why Use Second-Generation Packages in Salesforce?

    Blog in Salesforce Apex

    Do you know about Second-Generation packages? Max Shkrob, Salesforce Developer at Twistellar, gathered all the features and the main differences between 1GP and 2GP. Happy…

    App Launcher, Build Package Versions, Classes and Components, Complex Logic, Dev Hub
    Twistellar Jul 19, 2022
    4,810  Views

    Learn All About Salesforce Integration With Heroku

    Blog in Salesforce

    What is Heroku and How Does it Help in Integration? Salesforce can be integrated with any application that is used on a day-to-day basis. Most…

    Apex Workflow, API Built, APIs, App Deployed, Application
    Apphienz Mar 15, 2021
    2,774  Views

    Popular Salesforce Videos

    8 Steps to Launch Your App on Salesforce AppExchange

    8 Steps to Launch Your App on Salesforce AppExchange

    Video in AppExchange, Salesforce Apps

    AppExchange is the largest business app store in the world, with over 4,000 apps and millions of users. In this video, we will guide you…

    salesforce, Salesforce Apps, Salesforce App Development, Salesforce Video, Salesforce AppExchange
    ENWAY Nov 6, 2023
    4,082  Views
    Introduction To Salesforce Apex | DataType | Collection | Conditional Statements

    Introduction To Salesforce Apex | DataType | Collection | Conditional Statements

    Video in Salesforce Apex

    In this video salesforce apex hours creators provides an introduction to Apex. Apex enables developers to access the Salesforce platform, back-end database and client-server interfaces…

    salesforce, salesforce platform, Apex, Salesforce Developers, Salesforce Video
    Mayra Aug 11, 2022
    2,073  Views
    Schedule Apex Jobs with Lighting Web Components | Developer Quick Takes

    Schedule Apex Jobs with Lighting Web Components | Developer Quick Takes

    Video in Salesforce Apex

    Lightning Web Components gives you the ability to give your users a great user experience when interacting with Salesforce. In this example, we will take…

    Salesforce Training, Salesforce Developer, Salesforce Lightning, User Experience, Salesforce Video
    Jogender Sep 21, 2020
    1,830  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.