Activity › Forums › Salesforce® Discussions › What is the use of hasRecordId in Salesforce? Salesforce® Discussions What is the use of hasRecordId in Salesforce? Posted by Aditya on April 24, 2020 at 4:00 PM What is the use of hasRecordId in Salesforce? Manish replied 6 years, 1 month ago 4 Members · 3 Replies 3 Replies Marziya Member April 27, 2020 at 6:56 AM Hii Aditya, force:hasRecordId interface This interface is used to indicate that a component takes a record (SObject) as an attribute. [adinserter block='9'] Ayush Member April 27, 2020 at 9:56 AM This interface is used to indicate that a component takes a record (SObject) as an attribute. Manish Member April 27, 2020 at 11:47 AM 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. Public All Members My Connections Only Me PublicAll MembersMy ConnectionsOnly Me Public All Members My Connections Only Me