I am trying to generate the dynamic URL to redirect to record but it appends the id to the current page.
For example, I am getting this:
https://nishant-aishwarya-1234-dev-ed.lightning.force.com/lightning/page/0062w000003ar1dAAA/view
I want this:
https://nishant-aishwarya-1234-dev-ed.lightning.force.com/lightning/r/Opportunity/0062w000003ar1dAAA/view
Here is the code for the render
function:
if (columnNames[i] == 'name') {
columns.push({
data: columnNames[i],
title: columnNames[i],
render: function(data, type, row, meta) {
data = '<a href=' + row['id'] + '/view' + '>' + data + '</a>';
return data;
}
});
}