function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Puneet_MishraPuneet_Mishra 

Build Flexible Apps with Visualforce Pages and Lightning Components

Hi Guys,

I working on 'Build Flexible Apps with Visualforce Pages and Lightning Components' trailhead module and I was on 'Create a SimilarProperties Lightning Component' there is one statement comes up which states " the component also uses the force:hasRecordIdinterface, which will automatically retrieve the Id of the current Record page and store it in the <aura:attribute> with a name of recordId."
User-added image

My question is is it mandatory to declare attribute with name recordId instead on any other name like oppId etc.
and what if I have multiple attribute declare with same type="Id", how framework works in this case.

many of you might feel this question stupid but it just came to my mind. I am gonna try it myself but want to know from your expert views.

Thanks in advance.
Rahul KumarRahul Kumar (Salesforce Developers) 
Hi Puneet Mishra,

May I suggest you please refer the trailhead Project for reference. Hope it will be helpful.

Please mark it as best answer if the information is informative.so that question is removed from an unanswered question and appear as a proper solution.

Thanks
Rahul Kumar