Hi,
This is the first time I am trying JS Link in SharePoint. I do not have access to master pages. So, I have loaded below js file in Site Assets and referred in JS Link as: ~site/SiteAssets/CSR.js
RegisterModuleInit('/SiteAssets/CSR.js', updateTitle);
updateTitle();
function updateTitle() {
alert(1);
var priorityFiledContext = {};
priorityFiledContext.Templates = {};
priorityFiledContext.Templates.Fields = {
'Title': {'View': priorityFiledTemplate}
};
SPClientTemplates.TemplateManager.RegisterTemplateOverrides(priorityFiledContext);
alert(2);
}
function priorityFiledTemplate(ctx) {
alert(3);
var tem= ctx.CurrentItem[ctx.CurrentFieldSchema.Name];
return "<span style='color:green;font-weight:bolder'>"+tem+"</span>";
}Alerts 1 and 2 are fired but alert 3 is not working. That is, priorityFiledTemplate is never called. I have tried forced refresh(ctrl+F5) but still there is no change. Can anyone please help me
Regards, Sathiya