0

I have a requirement where I have to call a omnistudio flexcard from LWC and pass a row data on click of an id in a datatable. I'm trying to use navigationmixin.navigate to navigate to particular flexcard am able to navigate successfully but unable to pass row data. I have tried pusub but its not working. can anyone help me with this, please find my JS code below

handleRowAction(event) {

 const actionName = event.detail.action.name;

 const row = event.detail.row;

 console.log('action name ', actionName);

 console.log('row', row);

 switch (actionName) {

  case 'locationId':

  this[NavigationMixin.Navigate]({

   type: 'standard__component',

   attributes: {

   componentName: 'omnistudio__vlocityLWCOmniWrapper'

   },

   state: {

   c__target: 'c:cfCNCFacilityLocationsDetailsPage',

   c__tabLabel: row.locationId

   }

  })

  pubsub.fire("CNCFacilityLocationsDetailsPage", "recordData", {

   rowData: row

  });

  break;

  default:

 }

 }

1 Answer 1

0

Two possible solutions:

  1. Try calling the pubsub before navigation, register the pubsub in flexcard
  2. You could try platform event, pass data to platform event from LWC and register the same in FlexCard, refer the following resource [https://help.salesforce.com/s/articleView?id=sf.os_configure_a_platform_event_data_source_on_a_flexcard_37204.htm&type=5][1]
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.