Activity Forums Salesforce® Discussions What is the use of force:hasRecordId interface in Salesforce?

  • Laveena

    Member
    August 9, 2019 at 11:32 am

    Hi Achintya,

    Add the force:hasRecordId interface to a Lightning component to enable the component to be assigned the ID of the current record.
    The recordId attribute is set only when you place or invoke the component in a context of a record. For example, when you place the component on a record page, or invoke it as an action from a record page or object home. In all other cases, such as when you create this component programmatically inside another component, recordId isn’t set, and your component shouldn’t depend on it.

    Thanks

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos