Click or drag to resize
ISharePointListServiceGetListItems Method

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.2.23
Syntax
C#
DataSet GetListItems(
	string listTitle,
	string folderServerRelativeUrl = null,
	SharePointView view = null,
	SharePointListItemsSelection listItemsSelection = null
)

Parameters

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

Return Value

Type: DataSet
DataSet containing DataTable with list items.
Exceptions
ExceptionCondition
SharePointServerExceptionThrown whenever server error occurs.
WebExceptionThrown when error related to network or protocol occurs.
SharePointConnectionNotSupportedExceptionThrown when given connectionData contains unsupported authentication mode or invalid URL.
SharePointCCSDKExceptionThrown when identity client library "msoidcliL.dll" needed for SharePoint Online authentication is missing. See documentation for details.
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