Loading
Salesforce now sends email only from verified domains. Read More
Table of Contents
Select Filters

          No results
          No results
          Here are some search tips

          Check the spelling of your keywords.
          Use more general search terms.
          Select fewer filters to broaden your search.

          Search all of Salesforce Help
          Accessing the Context Id of an LWC Card on a Community Page (Managed Package)

          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.

          Managed Package app icon This information is for Omnistudio for Managed Packages. For Omnistudio on standard runtime, see Omnistudio Help.

          1. Add the recordId property to the configuration file form the Card Designer, perform the following tasks:
            1. Open the Vlocity Cards tab and click a card layout to open a version in the Cards Designer.

            2. Click Show XML Interface in the Cards pane.

            3. Select the CommunityDefault checkbox.

            4. Click the pencil icon next to CommunityDefault.

            5. Click the + icon next to Add Properties.

            6. Add recordId as the variable name for the name attribute.

            7. In the Select Property Type (Required) section, select String.

            8. Click Save to save the property.

            9. Click Save to save changes to the Metadata Configuration file.

            To add the recordId property from your LWC Card's configuration file:

            1. In your configuration file, add the targetConfig tag.

            2. 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>
          2. Add your LWC card to your Community page. See Adding an LWC Card to a Lightning or Community Page (Managed Package).
          3. In the recordId property field, enter {!recordId}.
            LWC community page record Id
           
          Loading
          Salesforce Help | Article