PLAT-DEV-210 practice question 14 of 25

A developer creates a Flexcard that displays a contact’s mailing address and passes the contact’s postal code to a child FlexCard. When configuration text elements in the child FlexCard, what syntax should a developer use to refer to the contact’s postal code?

Full set: 103 questions
Answer options
A: {Postalcode}
B: {Parent.postalcode}
C: {Records.postalcode}
D: {Params.postalcode} Correct answer
Correct Answer:
D. {Params.postalcode}
Explanation

In OmniStudio FlexCards, when a parent FlexCard passes data to a child FlexCard, it is done by setting key-value attributes on the child component's instance within the parent. The child FlexCard then accesses these passed-in values using the {Params} context variable. The syntax {Params.postalcode} correctly references the value associated with the postalcode key that was passed from the parent. This mechanism allows for modular and reusable child components that receive their context from a parent.

Why Incorrect

A. {Postalcode}: This syntax attempts to access a Postalcode field directly from the child FlexCard's own data source, not from a parameter passed by the parent.
B. {Parent.postalcode}: This syntax is used to access data directly from the parent FlexCard's data source. While possible, the standard and intended method for passing specific, isolated values is via the {Params} object.
C. {Records.postalcode}: This syntax is used within a repeating block to access a field from the current record in a list of records (e.g., from a data source that returns an array).

References

1. Salesforce OmniStudio Documentation: Pass Data from a Parent FlexCard to a Child FlexCard. This official guide states, "To pass data from a parent FlexCard to a child FlexCard, add an attribute to the child FlexCard element on the parent FlexCard. In the child FlexCard, access the data with the {params.attribute} merge field." This directly validates the use of the {Params} syntax.

2. Salesforce Trailhead: OmniStudio FlexCards > Embed a Child FlexCard in a Parent FlexCard. This module provides a step-by-step tutorial demonstrating the configuration. In the "Pass an Attribute to the Child FlexCard" section, it explicitly instructs the user to set an attribute on the parent and then use the {params.attributeName} syntax in the child to retrieve the value.

Scroll to Top