I want to created a component that would be used on a record detail page in a community
The component I created co far implements force:hasRecordId (and few more) but the id I get on run time in null.
flexipage:availableForRecordHome,
flexipage:availableForAllPageTypes,
force:hasRecordId,force:hasSObjectName,
forceCommunity:availableForAllPageTypes
What am I doing wrong. Is the feature only available for home pages?
Best Answer
use
force:hasRecordId
as documented hereFor the Experience builder the way I have managed to get the record ID is as below
Create an attribute
Let's get the Id now in our JS controller