Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

listviewInfo

Info

The listviewInfo command allows the user to request a list of the Salesforce ListViews available for a particular object type. A dictionary of ListView Labels indexed by their Ids is returned to the callback.

Code Block
var request = { 
    "type" : "listviewInfo",
    "object" : "Account",
    "data" : { } // no parameters available at the moment
};
bridge.sendRequest(request, function (responseData) {
    if ((responseData.type == 'listviewInfoResponse')
        && (responseData.data != null)) {
            alert('listview dictionary ' + responseData.data);
    }
});

listviewMetadata

Info

The listviewMetadata request allows the user to retrieve the details about a specific Salesforce ListView. This request will return a "listviewMetadataResponse" containing an object that specifies the fields, field labels, and criteria (for use in a Sql where clause) used in the requested object's ListView.

specify the Salesforce ListView to use by supplying the special keyword "@@listviewid" and the associated ListView Id:
{ "@@listviewid" : "00B123456789ABCDEF" }
See "listviewInfo" API for documentation about retrieving the ListView Id.

Code Block
var request = { 
    "type" : "listviewmetadata",
    "object" : "Account",
    "data" : { "@@listviewid" : "00B123456789101" }
};
bridge.sendRequest(request, function (responseData) {
    if ((responseData.type == 'listviewMetadataResponse')
        && (responseData.data != null)) {
            doSomethingWithListView(responseData.data);
    }
});