Sorry if my subject doesn't make sense, but what I am trying to do is create a custom component that displays a table of visits relative to a lead. This table displays the following:
- Visit ID
- Duration
- Page Views
- Browser
This list is displayed on a tab on the leads (sales insights) form.
What I would like to do is create a link on Visit ID column, that when clicked, takes you to the form related to that Id. This would operate similar to that of a default table that you can create in the editor (like shown below), however it would be coded in a PCF.
For example, clicking on the columns of a record with the id 2ec06197-31ec-ea11-a817-000d3a1b14a2 would take you to:
https://{organisation name}/main.aspx?appid={app id}&pagetype=entityrecord&etn=visit&id=2ec06197-31ec-ea11-a817-000d3a1b14a2
Here is my code for creating the table
<table className="table table-striped">
<thead>
<tr>
<th scope="col">Visit Id</th>
<th scope="col">Duration</th>
<th scope="col">Page Views</th>
<th scope="col">Browser</th>
</tr>
</thead>
{/* <!-- Table Contents --> */}
<tbody id="table-contents">
{
this.props.visits.map((visit: IVisit) => {
return (
<tr key={visit.id}>
<td>{visit.id}</td>
<td>{visit.duration}</td>
<td>{visit.views}</td>
<td>{visit.browser}</td>
</tr>
);
})
}
</tbody>
</table>
Is this possible?