UI Builder - event mapping

Pallavi Gaikwad
Tera Expert

Hi All,

 

I'm building a custom workspace. In that workspace I want to implement page navigation between list page and record details page. After clicking on any record its details should be open in record details page.

 

I'm using a list component. have added 'cell link clicked' event to that page.  Added link to destination handler to that event. However I'm unable to pass sys_id of selected record. Not sure from where I can get sys_id of selected record so that I can pass it. 


Please let me know how can I pass sys_id of selected record to record details page.

Thanks in advance!

2 ACCEPTED SOLUTIONS

Sarthak Kashyap
Kilo Sage

Hi @Pallavi Gaikwad ,

 

You can find the dynamic sys_id and table name 

 

Create two Client state parameter 1. table_name and 2. sys_id and create client script and add below code

console.log("Clicked = " + JSON.stringify(event));
console.log("Table name = " + event.payload.table);
console.log("Record id = " + event.payload.sys_id);
api.setState("tableName", event.payload.table);
api.setState("sys_id", event.payload.sys_id);

 

Now call above client script in your event called "cell link clicked" or "Link to Destination" also check the logs if your client script is calling or not.

 

Please mark my answer correct and helpful if this works for you

Thanks and Regards,

Sarthak

View solution in original post

Hi @Sarthak Kashyap 

 

Thank you for the solution. Able to access sys_id and table name from event payload. 

 

Need to dot walk as below and it works.

event.payload.cell.metadata.openRecordMetadata.sysId
event.payload.cell.metadata.openRecordMetadata.table

View solution in original post

5 REPLIES 5

debendudas
Mega Sage
Mega Sage

Hi @Pallavi Gaikwad,

 

If you are using a Presentational list, the Cell link selected event will look like this:

debendudas_0-1760940312697.png

 

You need to extract the table and sys_id from the cell key in the event payload:

  • Table: @payload.cell.metadata.openRecordMetadata.table
  • Sys ID: @payload.cell.metadata.openRecordMetadata.sysId

 

Use "Open page or URL" and map the table and sysId as below:

 

debendudas_1-1760940438859.png

debendudas_2-1760940453936.png

 

Please note: If these cell values are not visible in the event mapping, you can double-click the text area and paste the following mappings for table and sys_id.

 

If this solution helps you then, mark it as accepted solution ‌‌✔️ and give thumbs up 👍!