Newer Version Available

This content describes an older version of this product. View Latest

Configure Components for Lightning Experience Record Pages

After your component is set up to work on Lightning pages and in the Lightning App Builder, use these guidelines to configure the component so it works on record pages in Lightning Experience.

Record pages are different from app pages in a key way: they have the context of a record. To make your components display content that is based on the current record, use a combination of an interface and an attribute.

  • If your component is available for both record pages and any other type of page, implement flexipage:availableForAllPageTypes.
  • If your component is designed only for record pages, implement the flexipage:availableForRecordHome interface instead of flexipage:availableForAllPageTypes.
  • If your component needs the record ID, also implement the force:hasRecordId interface.

    Don’t expose the recordId attribute to the Lightning App Builder—don’t put it in the component’s design resource. You don’t want admins supplying a record ID.

    Note

  • If your component needs the object’s API name, also implement the force:hasSObjectName interface.
  • When a component is generated on the server from metadata, the page loads from a client-side cache of the indexed database. The client-side cache timeout is 8 hours, with a refresh interval of 15 minutes. This long timeout allows for faster page loads for users who bootstrap the application frequently or click links from outside the application to open a new browser window or tab to Lightning Experience.

If your managed component implements the flexipage or forceCommunity interfaces, its upload is blocked if the component and its attributes aren’t set to access="global". For more information on access checks, see Controlling Access.

Note

When you use the Lightning App Builder, there is a known limitation when you edit a group page. Your changes appear when you visit the group from the Groups tab. Your changes don’t appear when you visit the group from the Recent Groups list on the Chatter tab.

Note