Lists: ISharePointLists;
None;
The Lists method returns lists of the upper level of the SharePoint site.
Executing the example requires the SharePoint site located at: http://test-sharepoint.
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;
//Get root page of 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;
On executing the example the SharePoint site is connected, and the root page of the site is obtained. The development environment console displays the information about all root lists of the site.
See also: