2

I have SharePoint on-premises 2013, where inside some site collections, I define JSLINKs as follow, to disable site columns inside the quick edit grids:-

(function () {
    var overrideContext = {};
    overrideContext.Templates = overrideContext.Templates || {};
    overrideContext.Templates.OnPreRender = function(ctx) {
        var statusField = ctx.ListSchema.Field.filter(function(f) {
            return f.Name === 'ItemNumber';
        });
        if (statusField.length>0) {
            statusField[0].AllowGridEditing = false;
        }
    }
    SPClientTemplates.TemplateManager.RegisterTemplateOverrides(overrideContext);
})();

then I associate the site columns with the above JSLINK using this PowerShell:

$web = Get-SPWeb http://~******/
$field = $web.Fields["Item Number"]
$field.JSLink = "~siteCollection/Style Library/JS/HideItemNumberInQuickEdit.js"
$field.update($true)

now I have migrated my site collections from SharePoint 2013 on-premises to office 365, using a third part tool. but I have noted that the site columns were enabled inside the quick grid edit, inside SP online. so I am not sure, if there is a way to reassign the jslink to my online sitecolumns? of course the JSLINK file HideItemNumberInQuickEdit.js itself were migrated correctly.

second question. if I manage to re-assign the JSLINK, then will my above JSLINK be able to disable the site column inside the quick edit grid even on the modern user interface inside SharePoint 365?

thanks

  • 1
    You should consider reporting this to the 3rd party tool vendor. – moe Jan 10 '18 at 6:05
  • @moe I already did that .. but seems they do not support this !! so what I can do ? can I reassign the jslink manully for the migrated site columns? – SharePoint TestDev Jan 10 '18 at 12:56
0

You might want to have a look into how you can migrate your existing customization to support in the modern ui : https://docs.microsoft.com/en-us/sharepoint/dev/spfx/extensions/guidance/migrate-jslink-to-spfx-extensions

Look for Field customizer example : https://docs.microsoft.com/en-us/sharepoint/dev/spfx/extensions/get-started/building-simple-field-customizer

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.