Salesforce Certified Omnistudio Consultant free question 4 / 10 · Domain 2: Flexcards
A Flexcard with a Data Mapper data source uses the recordId context variable and shows data on a Lightning record page. On an Experience Builder page it shows nothing. What should the consultant change?
- Add the Community Default target in the Publish Options of the card
- Add a record ID exposed attribute and set it on the page
- Select Repeat Records so a card is generated for the account record
- Replace the data source with a custom data source
Show the answer and explanation
Answer: B
Why this is correct
The Examples for Flexcard Settings page explains that most Flexcards with an Apex remote, Data Mapper, or Integration Procedure data source use a context ID represented by the recordId context variable. On an Experience Builder page the Flexcard needs an exposed attribute, such as RecordId with the value {!recordId}, and you then enter {!recordId} in the Record Id field of the component. Without it, the data source receives no ID.
Why the other options are wrong
"Select Repeat Records so a card is generated for the account record" … Repeat Records generates a card container for each record the data source returns. It does not supply the record ID that the data source needs.
"Add the Community Default target in the Publish Options of the card" … Community Default lets Experience Builder expose editable properties. The Flexcard still needs a record ID property to pass to its data source.
"Replace the data source with a custom data source" … A custom data source embeds static JSON. It would show fixed values and not the data of the record on the page.
Key points
On Experience sites, a Flexcard does not get a record ID by itself. Add a record ID property and map it on the page.