1

I'm experiencing issues with the JSLink Override specifically for individual fields.

When attached to items, headers and footers I have no problem, but the field functions don't fire at all. Code below. I may be overlooking something ~ the debugger at the beginning of the function doesn't fire.

(function () {
    var overrideCtx = {};
    overrideCtx.Templates = {};
    overrideCtx.Templates.Fields = 
    {
        'Title': { 'View': overrideField }
    };
    SPClientTemplates.TemplateManager.RegisterTemplateOverrides(overrideCtx);
}     
)();

function overrideField(ctx){
    debugger
    return "<div class='fellowID'>" + ctx.CurrentItem.Title + "</div>";
}
  • does JavaScript load successfully at all? have you missed any syntax errors? does anything look wrong in the console output? does a simple breakpoint work with developer tools active? – Alexey Krasheninnikov May 11 '17 at 15:21
  • Yep. Js Loads. Header, footer & item loads - fields doesn't. – Oxossi May 11 '17 at 16:13
  • 1
    Always use Cisar for CSR, you are now missing all the boilerplate code that takes care of MDS, and it will give you the boilerplate code for Fields – Danny '365CSI' Engelman May 11 '17 at 16:50
1

The internal field name was LinkTitleNoMenu.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.