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:
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?
if you are using dynamics 365 subgid (out of the box), you can use openform or navigateto function of dynamics 365 client api
Here is an article explaning exactly what you wish to achieve
But I see you tagged reactjs, I believe you wish to create you own subgrid, you can definitely do so. For that you should try PowerApps component framework (PCF). Now there is community which already contains different subgrids created by community users. Take a look at pcfgallery especially subgid from pcf this shall be very helpful