ISharePointWeb.Lists

Fore Syntax

Lists: ISharePointLists;

Fore.NET Syntax

None

Description

The Lists method returns lists of the upper level of the SharePoint site.

Example

Executing the example requires the SharePoint site located by the http://test-sharepoint address.

Sub UserProc;
Var
    Site: ISharePointSite;
    Web: ISharePointWeb;
    Lists: ISharePointLists;
    List: ISharePointList;
    i: Integer;
Begin
    Site := New SharePointSite.Create;
    Site.Url := "http://test-sharepoint";
    Site.UseDefaultCredentials := True;
    //Getting a root page of a site
    Web := Site.RootWeb;
    Lists := Web.Lists;
    For i := 0 To Lists.Count - 1 Do
        List := Lists.Item(i);
        Debug.WriteLine(Title: + List.Title);
        Debug.Indent;
        Debug.WriteLine(Type: + List.Type.ToString + "; Name: " + List.Title + "; Description: " + List.Description);
        Debug.WriteLine(List relative address: " + List.DefaultViewUrl + "; Pattern relative address: " + List.DocTemplateUrl);
        Debug.Unindent;
    End For;
End Sub UserProc;

When executing an example the connection to the SharePoint site and getting the root page of the site is performed. The information about all root lists of the site is displayed in the development environment output.

See also:

ISharePointWeb