- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
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!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
If you add the record list component on a page it should be added with presets. There is a list controller that has a reference link selected -event with Nav item selected - Data resource -handler. Here you can edit the route to your record page if not named the default "record". You can also easily expose an event object by defining a client script that has console.log(event) and binding it as an event handler to the event you want then observing from the browser console
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi @lauri457
Thank you for reverting. yes, adding a console log for event helped me to trace the JSON and accessing sys id and table name.
