Forum Discussion
Ole Bergtun
Dec 12, 2016Brass Contributor
Adding and Removing JSLink from view using CSOM
I'm trying to remove some JSLinks on views, but they will not go away... can someone help me spot where i go wrong? File oFile = context.Web.GetFileByServerRelativeUrl(view.ServerRelativeUrl);...
Kiril Iliev
Dec 15, 2016Brass Contributor
You should take a look at the View's JSLink property instead of looking up in the web parts of the view.
just
view.JSLink = String.Empty
view.Update()
context.ExecuteQuery()
just
view.JSLink = String.Empty
view.Update()
context.ExecuteQuery()