Version

List.getListMetadata

This method is used to get information from a SharePoint list. As parameter, it receives a JavaScript object with two properties: the GUID of the SharePoint list and the URL to the SharePoint site containing that list.

You can use List.getListMetadata to get valuable information from a list before adding or updating an item to that list. For example, you get the content types and required fields from the list. In the case that you need the GUID of the list, you can get it using the Web.getWebsAndLists method.

Syntax

SPlus.List.getListMetadata (args, function (result){
        //TODO: Implement what to do with the list information
}, function (eResponse){
        //TODO: Implement how to handle error information
}, function (){
        //TODO: Implement how to handle a user’s cancel
});

List.getListMetadata Parameters

Parameter

Type

Description

args

JavaScript Object

The args Object includes two properties, the GUID of the SharePoint list and the URL to the SharePoint site containing that list.

onSuccess callback function

Parameter

Description

function (result)

Success callback function to be implemented. When successful, result returns as an empty dictionary.

onError callback function

Parameter

Description

function (eResponse)

Error callback function to be implemented, which receives the eResponse JavaScript Object.

onCancel callback function

Parameter

Description

function (result)

Cancel callback function to be implemented.