Skip to content

Instantly share code, notes, and snippets.

@islaytitans

islaytitans/SampleOrders.js Secret

Created Mar 12, 2016
Embed
What would you like to do?
Retrieve data from the sampleorders pipeline to fill a Sitecore SPEAK ListControl
define(["sitecore", "/-/speak/v1/experienceprofile/DataProviderHelper.js"], function (sc, providerHelper)
{
var app = sc.Definitions.App.extend({
initialized: function ()
{
var tableName = "sampleorders"; // Case Sensitive!
var localUrl = "/intel/" + tableName;
providerHelper.setupHeaders([
{ urlKey: localUrl + "?", headerValue: tableName }
]);
var url = sc.Contact.baseUrl + localUrl;
providerHelper.initProvider(this.SampleOrdersDataProvider, tableName, url, this.SampleOrdersTabMessageBar);
providerHelper.subscribeSorting(this.SampleOrdersDataProvider, this.SampleOrders);
providerHelper.getListData(this.SampleOrdersDataProvider);
providerHelper.subscribeAccordionHeader(this.SampleOrdersDataProvider, this.SampleOrdersAccordion);
sc.Contact.subscribeVisitDialog(this.SampleOrders);
}
});
return app;
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.