ISharePointListService GetListItems Method Kentico 8.1 API Reference

Gets (optionally) a selection of list items of SharePoint list identified by its title. Keeping listItemsSelection.FieldName or listItemsSelection.FieldType unspecified causes all items (optionally restricted by camlQueryString) to be selected. Keeping camlQueryString unspecified causes all list items to be selected (the listItemsSelection still applies).

The listItemsSelection parameter is provided just for comfortability reason and the same can be achieved using

            <Query>
                <And>
                    camlQueryString <Eq><FieldRef Name="FieldName" /><Value Type="FieldType">FieldValue</Value></Eq>
                </And>
            </Query>
            

The DataSet has an empty table (with no columns) if no list items are retrieved.

Namespace: CMS.SharePoint
Assembly: CMS.SharePoint (in CMS.SharePoint.dll) Version: 8.0.0.0 (8.1.5347.20411)

Parameters

listTitle
Type: OnlineSystem String
SharePoint list title
folderServerRelativeUrl (Optional)
Type: OnlineSystem String
Relative URL of listed folder (if list supports subfolders). Keep blank for root listing.
view (Optional)
Type: CMS.SharePoint SharePointView
Configuration options for list items retrieval.
listItemsSelection (Optional)
Type: CMS.SharePoint SharePointListItemsSelection
Constraint for selection of certain items.

Return Value

Type: OnlineDataSet
DataSet containing DataTable with list items.
Exceptions

ExceptionCondition
CMS.SharePoint SharePointServerExceptionThrown whenever server error occurs.
OnlineSystem.Net WebExceptionThrown when error related to network or protocol occurs.
CMS.SharePoint SharePointConnectionNotSupportedExceptionThrown when given connectionData contains unsupported authentication mode or invalid URL.
CMS.SharePoint SharePointCCSDKExceptionThrown when identity client library "msoidcliL.dll" needed for SharePoint Online authentication is missing. See documentation for details.
OnlineSystem ExceptionThrown in case of unexpected error condition.
Remarks

The value of parameter folderServerRelativeUrl can originate from FileRef column of parent folder items listing. To determine whether an item is a folder, check the FSObjType column's value equality to 1.
See Also