Contact Us:

670 Lafayette Ave, Brooklyn,
NY 11216

+1 800 966 4564
+1 800 9667 4558

Accessing record ID in the Lightning component is very simple. Just use following things.

  1. Implements force:hasRecordId interface in the component as follows.
    <aura:component implements="flexipage:availableForRecordHome,force:hasRecordId" access="global">
  2. Define an aura:attribute as follows.
    <aura:attribute name="recordId"
     type="String"
     description="The ID of the record to be displayed. Provided by force:hasRecordId interface."/>

Leave a comment

Your email address will not be published. Required fields are marked *