Click or drag to resize
ISharePointListServiceGetListItems Method

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

The listItemsSelection parameter is provided just for comfortability reason and produces a query similar to the following

            <Query>
                <And>
                    QueryInnerXml <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: 10.0.0
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