NSOA.listview.list()

Use this function to read the list of published lists available from the SuiteProjects Pro OData service. Returns the list of published lists.

Note:

The Business Intelligence Connector feature must be enabled for your account to use NSOA.listview and NSOA.report functions. The Business Intelligence Connector feature is a licensed add-on. To enable this feature, contact your SuiteProjects Pro account manager.

For more information about publishing lists and reports to the SuiteProjects Pro OData service, see Business Intelligence Connector.

Parameters

N/A

Returns

The list of published lists. Each item in the list has the following properties:

  • ID — The published list OData resource ID

  • Name — The name of the list

  • Last published — The date and time when the list was last published

    Important:

    The Last published property will be Last_published with an underscore instead of the space if the optional feature Replace Non-Alphanumeric Characters with Underscores in Column Titles and Metadata is enabled for your account. Accommodate both possibilities in your scripts to ensure your scripts continue work whether the feature is enabled or not.

Units Limit

1 unit

Since

April 18, 2020

Example

            // get the list of published listviews
var listviews = NSOA.listview.list();

// each item in the list has following properties
//  * 'ID'
//  * 'Name'
//  * 'Last_published'

// loop through all published listviews and find given listview ID
var i;
var listviewId;
for (i = 0; i < listviews.length; i++) {
    if (listviews[i].Name === 'My Approved Bookings') {
        listviewId = listviews[i].ID;
        break;
    }
}

// if listview ID was found get its data
if (listviewId > 0) {
    var rows = NSOA.listview.data(listviewId);

    // process all listview rows
}