Skip to content
This repository was archived by the owner on Feb 12, 2022. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions elements/force-sobject-listview/force-sobject-listview.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<!--
force-sobject-listview : Polymer Component quries salesforce using ListView API, through AJAX call and list the available view based on the sObject
you point to

@attributes:
sobject: (Required) Type of sobject on which you want to render a list
querytype: (Optional) Default: mru. Type of query (mru, soql, sosl, cache). Required if query attribute is specified.

@methods:
refresh: Refreshes the list view
-->
<link rel="import" href="../../dependencies/polymer/polymer.html">
<link rel="import" href="../force-app/force-app.html">
<polymer-element name="force-sobject-listview" attributes="sobject">
<script src="force-sobject-listview.js"></script>
</polymer-element>
17 changes: 17 additions & 0 deletions elements/force-sobject-listview/force-sobject-listview.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// Call the List View API to get the results (also includes column definitions)
Polymer('force-sobject-listview', {
observe: {
sobject: 'updateListView'
},
updateListView: function() {
var that = this;
that.listviews = null;
var query = '/services/data/v32.0/sobjects/' + this.sobject + '/listviews/';
var success = function(response) {
that.listviews = response.listviews;
};
SFDC.launcher.then(function(){
Force.forcetkClient.impl.ajax(query, success);
});
}
});