Get Id from current page in Lightning Component



1. Get Id from current page
1.1 Add 'force:hasRecordId' to implements
 <aura:component implements="force:hasRecordId"> 
1.2 Create attribute to receive Id
 <aura:attribute name="recordId" type="Id" />

1.3 In controller js
component.get("v.recordId");

Comments

Popular posts from this blog

Privacy Policy

Query in Loop problem: ( we do not need to to select query in loop )

How to set up vscode with salesforce sandbox