Skip to content

Instantly share code, notes, and snippets.

@islaytitans
Created July 29, 2015 12:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save islaytitans/17165f2d17bbabb872fc to your computer and use it in GitHub Desktop.
Save islaytitans/17165f2d17bbabb872fc to your computer and use it in GitHub Desktop.
Sitecore Hackathon GetFields
GetFields: function () {
var datasource = this.DataSource;
var querystring = this.GetQueryString();
var itemid = querystring["itemid"];
var fieldService = new entityService({
url: "/sitecore/api/ssc/DevToolKit-Controllers/SitecoreItem"
});
var result = fieldService.fetchEntity(itemid).execute().then(function (item) {
datasource.viewModel.items(item.Fields.underlying);
});
},
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment