top of page
OmniStudioFactBg.png
Writer's pictureDinesh Kumar

Passing Data From Child to Parent FlexCard

Updated: Mar 9, 2023


We can pass the data from child to parent FlexCard using Custom Event as below:


1. Create a Custom Event action on the child FlexCard.

  • Drag an action element onto the canvas.

  • Select Event as the Action Type and Custom as the Event Type.

  • In Event Name, enter a name for the event, such as ‘updatecity’

  • To configure the data to be passed to the parent FlexCard, click + Add New in the Input Parameters section.

  • In the Key, enter a name that can be used later to retrieve the value in the parent FlexCard. For example cityname.

  • In Value, enter the value to be passed. For example, enter the value New York or enter a merge field from the child's data source, such as {City}.

  • Activate the child FlexCard.

2. Create an event listener on the parent FlexCard

  • To listen to the above custom event, in the Setup panel, click + Add New in the Event Listener section

  • Select Custom Event as the Event Type.

  • Enter the Event Name as the name of the event created in the child FlexCard, such as updatecity.

  • To update the data fields on the parent with the data that is passed from the child create a Set Values action on the above event listener.

    1. In the Action section, select Card as the Action Type and Set Values as Type.

    2. Click + Add New in the Set Values section.

    3. Click into the Key and from the list of options select the data field to be updated.

    4. In the Value, use the action.param context variable as a merge field to enter the name of the input parameter passed from the child FlexCard. For example, if the Key from the input parameter on the custom event is cityname, enter {action.cityname}.

References:

  1. https://help.salesforce.com/s/articleView?id=sf.os_pass_data_from_a_child_flexcard_to_a_parent_flexcard_29189.htm&type=5

2,467 views2 comments

Recent Posts

See All

2 Comments


Guest
Mar 05

not working for me

Like
Guest
Mar 05
Replying to

same here

Like
bottom of page