I am trying to get field of a list :
var ctx = SP.ClientContext.get_current()
var web = ctx.get_web()
var list = web.getList(_spPageContextInfo.webAbsoluteUrl + "/lists/DocumentReferences")
ctx.load(list)
ctx.executeQueryAsync(function(){alert("ok");}, function(){alert("ko");})
It's work but, after, if I try to do this :
var field = list.get_fields().getByInternalNameOrTitle("ColumnName");
I have this error :
list.get_fields is not a function
Someone know why?
Thanks !