SP.SOD.executeFunc("sp.js", 'SP.ClientContext', function () { var hostsuburl = "Subsite URL goes here"; var context = new SP.ClientContext(hostsuburl); var oList = context.get_web().get_lists().getByTitle("ResourceDetails"); var camlQuery = new SP.CamlQuery(); camlQuery.set_viewXml("<View><Query><Where><Eq><FieldRef Name='monthnumber'/><Value Type='Text'>" + CurrentMonth + "</Value></Eq></Where></Query></View>"); this.collListItem = oList.getItems(camlQuery); context.load(collListItem, 'Include(ActualHours,AvailableHours,CostPerHour)'); context.executeQueryAsync(function onQuerySucceeded(sender, args) { alert('Inside OnQuery succeeded'); } , function onQueryFailed(sender, args) { alert('Failed to get lists. Error:n1' + args.get_message()); }); });
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)