I have the following JS link , which i have added to classic interface inside our sharepoint on-premises 2013:-
(function () {
function registerRenderer() {
var ctxForm = {};
ctxForm.Templates = {};
ctxForm.Templates = {
Fields : {
'LinkTitle': { //------ Change Hyperlink of LinkTitle
View : function (ctx) {
alert("123");
if(ctx.CurrentItem.SiteCreated != null && ctx.CurrentItem.SiteCreated === 'Yes'){
var url = String.format('{0}{1}', "/sites/projectmanagement/", ctx.CurrentItem.ID);
return String.format('<a href="{0}" onclick="EditItem2(event, \'{0}\');return false;">{1}</a>', url, ctx.CurrentItem.Title);
}
else
{
var url = String.format('{0}{1}', "/Lists/projects/DispForm.aspx?ID=", ctx.CurrentItem.ID);
return String.format('<a href="{0}" onclick="EditItem2(event, \'{0}\');return false;">{1}</a>', url, ctx.CurrentItem.Title);
}
}
},
}
};
SPClientTemplates.TemplateManager.RegisterTemplateOverrides(ctxForm);
}
ExecuteOrDelayUntilScriptLoaded(registerRenderer, 'clienttemplates.js');
})();
then i reference it as follow inside the list view:-
now the JS link will modify the item url base on a custom column value. When i migrated the site to sharepoint online, the JSLINK will work perfectly on classic interface, but if i switch to modern interface the JSLINK will not have any effect. so can anyone advice if i can use my JSLINK to have effect on modern interfaces in sharepoint online? if the answer is No, then what are the approaches i can follow to achieve this ?
Thanks