You are here:
Accessing the Context Id of an LWC Card on a Community Page (Managed Package)
For the managed package runtime, on a Community page, to view record data on an LWC Card that uses the {{params.id}} context variable in an Input Map to pass a
context Id to an Apex Remote, Omnistudio Data Mapper, or Integration Procedure data source, you must add
and configure a recordId property. Add the recordId property in your LWC Card's configuration
file, then configure the property on the Community page.
This information is for Omnistudio for Managed Packages. For Omnistudio on standard runtime, see Omnistudio Help.
-
Add the recordId property to the configuration file form the Card Designer,
perform the following tasks:
-
Open the Vlocity Cards tab and click a card layout to open a version in the Cards Designer.
-
Click Show XML Interface in the Cards pane.
-
Select the CommunityDefault checkbox.
-
Click the pencil icon next to CommunityDefault.
-
Click the + icon next to Add Properties.
-
Add recordId as the variable name for the name attribute.
-
In the Select Property Type (Required) section, select String.
-
Click Save to save the property.
-
Click Save to save changes to the Metadata Configuration file.
To add the recordId property from your LWC Card's configuration file:
-
In your configuration file, add the targetConfig tag.
-
Inside the targetConfig tag, add a property tag with the name recordId and the type String.
<targetConfig targets="lightningCommunity__Default"> <property name="recordId" type="String" ></property> </targetConfig>
-
- Add your LWC card to your Community page. See Adding an LWC Card to a Lightning or Community Page (Managed Package).
-
In the recordId property field, enter
{!recordId}.


