Activity Forums Salesforce® Discussions How to use HasRecordid in Lightning Component in Salesforce?

  • Marziya

    Member
    February 10, 2020 at 4:45 pm

    Hii Deepak,

    Add the force:hasRecordId interface to a Lightning component to enable the component to be assigned the ID of the current record.
    ...
    force:hasRecordId in Custom Lightning Component development

  • Shubham

    Member
    February 10, 2020 at 5:06 pm

    Hi Deepak,

    The force:hasRecordId interface does two things to a component that implements it.

    It adds an attribute named recordId to your component. This attribute is of type String, and its value is an 18-character Salesforce record ID,

    When your component is invoked in a record context in Lightning Experience or the Salesforce app, the recordId is set to the ID of the record being viewed

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos