You are here:
Access the ContextId of a Flexcard on an Experience Site
Most Flexcards use a ContextId, represented by the {recordId} context variable in an Input Map, to retrieve data from an Apex
Remote, Omnistudio Data Mapper, or Integration Procedure data source. For a Flexcard to use
the {recordId} context variable on an Experience site,
you must add and configure a RecordId property. Add this property to your Flexcard's
configuration, then configure the property on the Experience page.
- In the Flexcard Designer, select Setup to open the Setup panel.
-
Click + Add New next to Exposed
Attributes, and enter the values for the following properties:
-
Attribute: Enter RecordId.
ImportantFrom a Custom LWC or an Omniscript, reference the generated API name in kebab case, cf-record-id.
-
Type: Select String.
-
Targets: Select one or more page types for which this property is visible, such as lightning__RecordPage.
NoteTo view the property in an Experience Builder site, select lightningCommunity__Default.
-
Label: Enter the property label, such as Record ID.
-
Value: Enter {!recordId}.
-
- Click Save.
- Activate your Flexcard.
- Add your Flexcard to your Experience site. See Add a Flexcard to an Experience Cloud Page.
- In the Experience Builder's properties panel, in the RecordId property field, enter {!recordId}.

