Activity Forums Salesforce® Discussions What are Local and Global ids with respect to lightning component in salesforce?

  • What are Local and Global ids with respect to lightning component in salesforce?

    Posted by MOHIT on June 8, 2020 at 5:09 pm

    What are Local and Global ids with respect to lightning component in salesforce?

    Shweta replied 4 years, 5 months ago 2 Members · 1 Reply
  • 1 Reply
  • Shweta

    Member
    June 9, 2020 at 2:02 pm

    The component has two types of IDs: a local ID and a global ID:
    Local ID: It is an ID that is only scoped to the component. It is often unique but it’s not required to be unique. Local ID is created by using the aura:id attribute. E.g.: To find the local ID for a component in JavaScript, use cmp.getLocalId()
    Global IDs: Every component has a unique global Id, which is the generated run=me-­‐unique ID of the component instance.

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos