javascript - Display a sharepoint list row in a table with JS -


i have sharpoint list 1 row containing project info. projectnumber projectname projectadmin contracter , on. want display nice table in teamsite. reckon done display template or javascript. tryed code, returns undefined custom fields please help..

(function () {  var itemctx = {}; itemctx.templates = {};      itemctx.templates.header = "<div><b></b></div><table>";     itemctx.templates.item = itemoverridefun;     itemctx.templates.footer = "</table>";  itemctx.listtemplatetype = 100;  spclienttemplates.templatemanager.registertemplateoverrides(itemctx);  })();   function itemoverridefun(ctx) {  var var_prnummer = ctx.currentitem.prosjektnummer; var var_prnavn = ctx.currentitem.prosjektnavn; var var_prleder = ctx.currentitem.prosjektleder; var var_endret = ctx.currentitem.endret   return "<tr style='background-color: #aee33b;width: 300px;height: 24px;'><td>prosjektnummer</td><td>"   + var_prnummer + "</td></tr>" + "<tr><td>prosjektnavn</td><td>" + var_prnavn + "</td></tr>" + "<tr><td>prosjektleder</td><td>" + var_prleder + "</td></tr>" + "<tr><td>endret</td><td>" + var_endret + "</td></tr>"  "</span>";  } 

screenshot. https://1drv.ms/i/s!ao_2yx-u1ukulsxl93iyehegiv5zfa

have @ javascript object model jsom. need:

https://msdn.microsoft.com/en-us/library/office/jj163201.aspx#basicops_splistitemtasks


Comments

Popular posts from this blog

sql - invalid in the select list because it is not contained in either an aggregate function -

Angularjs unit testing - ng-disabled not working when adding text to textarea -

How to start daemon on android by adb -