Class List

Represents a list on a SharePoint Web site.

Hierarchy

Index

Methods

Methods

public addItem(parameters: ListItemCreationInformation): ListItem

Creates a new list item in the list.

Parameters

Returns

ListItem

public breakRoleInheritance(copyRoleAssignments: boolean, clearSubscopes: boolean)

Parameters

  • copyRoleAssignments: boolean
  • clearSubscopes: boolean

public customFromJson(initValue: any): boolean

Parameters

  • initValue: any

Returns

boolean

public deleteObject()

Deletes the list.

public fromJson(initValue: any)

Parameters

  • initValue: any

public getChanges(query: ChangeQuery): ChangeCollection

Returns the collection of changes from the change log that have occurred within the list, based on the specified query.

Parameters

Returns

ChangeCollection

public getItemById(id: number): ListItem

Gets item by id.

Parameters

  • id: number

Returns

ListItem

public getItems(query: CamlQuery): ListItemCollection

Returns collection of list items based on the specified CAML query.

Parameters

Returns

ListItemCollection

public getListItemChangesSinceToken(query: ChangeLogItemQuery): Array<any>

Returns array of items describing changes since time specified in the query

Parameters

Returns

Array<any>

public getRelatedFields(): RelatedFieldCollection

Returns a collection of lookup fields that use this list as a data source and that have FieldLookup.IsRelationship set to true.

Returns

RelatedFieldCollection

public getRelatedFieldsExtendedData(): RelatedFieldExtendedDataCollection

This member is reserved for internal use and is not intended to be used directly from your code.

Returns

RelatedFieldExtendedDataCollection

public getUserEffectivePermissions(userName: string): BasePermissions

Gets the effective permissions that a specified user has on the list.

Parameters

  • userName: string

Returns

BasePermissions

public getView(viewGuid: Guid): View

Returns the list view with the specified view identifier.

Parameters

Returns

View

public get_allowContentTypes(): boolean

Gets a value that specifies whether the list supports content types.

Returns

boolean

public get_baseTemplate(): number

Gets the list definition type on which the list is based. For lists based on OOTB list definitions, return value corresponds the SP.ListTemplateType enumeration.

Returns

number

public get_baseType(): BaseType

Gets base type for the list.

Returns

BaseType

public get_browserFileHandling(): BrowserFileHandling

Gets a value that specifies the override of the web application�s BrowserFileHandling property at the list level.

Returns

BrowserFileHandling

public get_contentTypes(): ContentTypeCollection

Gets the content types that are associated with the list.

Returns

ContentTypeCollection

public get_contentTypesEnabled(): boolean

Gets a value that specifies whether content types are enabled for the list.

Returns

boolean

public get_context(): ClientRuntimeContext

Returns

ClientRuntimeContext

public get_created(): Date

Gets a value that specifies when the list was created.

Returns

Date

public get_dataSource(): ListDataSource

Gets the data source associated with the list, or null if the list is not a virtual list.

Returns

ListDataSource

public get_defaultContentApprovalWorkflowId(): Guid

Gets a value that specifies the default workflow identifier for content approval on the list.

Returns

Guid

public get_defaultDisplayFormUrl(): string

Gets a value that specifies the location of the default display form for the list.

Returns

string

public get_defaultEditFormUrl(): string

Gets a value that specifies the URL of the edit form to use for list items in the list.

Returns

string

public get_defaultNewFormUrl(): string

Gets a value that specifies the location of the default new form for the list.

Returns

string

public get_defaultView(): View

Gets default view for the list.

Returns

View

public get_defaultViewUrl(): string

Get URL of the default view for the list.

Returns

string

public get_description(): string

Gets a value that specifies the description of the list.

Returns

string

public get_direction(): string

Gets a value that specifies the reading order of the list.

Returns

string

public get_documentTemplateUrl(): string

Gets a value that specifies the server-relative URL of the document template for the list

Returns

string

public get_draftVersionVisibility(): DraftVisibilityType

Gets a value that specifies the minimum permission required to view minor versions and drafts within the list.

Returns

DraftVisibilityType

public get_effectiveBasePermissions(): BasePermissions

Gets a value that specifies the effective permissions on the list that are assigned to the current user.

Returns

BasePermissions

public get_effectiveBasePermissionsForUI(): BasePermissions

Gets the effective base permissions for the current user, as they should be displayed in UI. This will only differ from EffectiveBasePermissions if ReadOnlyUI is set to true, and in all cases will be a subset of EffectiveBasePermissions. To put it another way, EffectiveBasePermissionsForUI will always be as or more restrictive than EffectiveBasePermissions.

Returns

BasePermissions

public get_enableAttachments(): boolean

Gets a value that specifies whether list item attachments are enabled for the list.

Returns

boolean

public get_enableFolderCreation(): boolean

Gets a value that specifies whether new list folders can be added to the list.

Returns

boolean

public get_enableMinorVersions(): boolean

Gets a value that specifies whether minor versions are enabled for the list.

Returns

boolean

public get_enableModeration(): boolean

Gets a value that specifies whether content approval is enabled for the list.

Returns

boolean

public get_enableVersioning(): boolean

Gets a value that specifies whether historical versions of list items and documents can be created in the list

Returns

boolean

public get_entityTypeName(): string

The entity type name.

Returns

string

public get_eventReceivers(): EventReceiverDefinitionCollection

Gets collection of event receiver objects associated with the list.

Returns

EventReceiverDefinitionCollection

public get_fields(): FieldCollection

Gets a value that specifies the collection of all fields in the list.

Returns

FieldCollection

public get_firstUniqueAncestorSecurableObject(): SecurableObject

Returns

SecurableObject

public get_forceCheckout(): boolean

Gets a value that indicates whether forced checkout is enabled for the document library.

Returns

boolean

public get_forms(): FormCollection

Gets collections of forms associated with the list.

Returns

FormCollection

public get_hasExternalDataSource(): boolean

Returns true if this is external list.

Returns

boolean

public get_hasUniqueRoleAssignments(): boolean

Returns

boolean

public get_hidden(): boolean

Gets wherever the list is hidden

Returns

boolean

public get_id(): Guid

Gets id of the list

Returns

Guid

public get_imageUrl(): string

Gets a value that specifies the URI for the icon of the list

Returns

string

public get_informationRightsManagementSettings(): InformationRightsManagementSettings

Settings of document library Information Rights Management (IRM)

Returns

InformationRightsManagementSettings

public get_irmEnabled(): boolean

Gets a value that specifies whether Information Rights Management (IRM) is enabled for the list.

Returns

boolean

public get_irmExpire(): boolean

Gets a value that specifies whether Information Rights Management (IRM) expiration is enabled for the list.

Returns

boolean

public get_irmReject(): boolean

Gets a value that specifies whether Information Rights Management (IRM) rejection is enabled for the list.

Returns

boolean

public get_isApplicationList(): boolean

Indicates whether this list should be treated as a top level navigation object or not.

Returns

boolean

public get_isCatalog(): boolean

Gets a value that specifies whether the list is a gallery.

Returns

boolean

public get_isPrivate(): boolean

Gets a value that indicates whether the document library is a private list with restricted permissions, such as for Solutions.

Returns

boolean

public get_isSiteAssetsLibrary(): boolean

Gets a value that indicates whether the list is designated as a default asset location for images or other files which the users upload to their wiki pages.

Returns

boolean

public get_itemCount(): number

Gets a value that specifies the number of list items in the list

Returns

number

public get_lastItemDeletedDate(): Date

Gets a value that specifies the last time a list item was deleted from the list.

Returns

Date

public get_lastItemModifiedDate(): Date

Gets a value that specifies the last time a list item, field, or property of the list was modified.

Returns

Date

public get_listItemEntityTypeFullName(): string

The entity type full name of the list item in the list.

Returns

string

public get_multipleDataList(): boolean

Gets a value that indicates whether the list in a Meeting Workspace site contains data for multiple meeting instances within the site

Returns

boolean

public get_noCrawl(): boolean

Gets a value that specifies that the crawler must not crawl the list

Returns

boolean

public get_objectVersion(): string

Returns

string

public get_onQuickLaunch(): boolean

Gets a value that specifies whether the list appears on the Quick Launch of the site

Returns

boolean

public get_parentWeb(): Web

Gets a value that specifies the site that contains the list.

Returns

Web

public get_parentWebUrl(): string

Gets a value that specifies the server-relative URL of the site that contains the list.

Returns

string

public get_path(): ObjectPath

Returns

ObjectPath

public get_roleAssignments(): RoleAssignmentCollection

Returns

RoleAssignmentCollection

public get_rootFolder(): Folder

Gets the root folder that contains the files in the list and any related files.

Returns

Folder

public get_schemaXml(): string

Gets a value that specifies the list schema of the list.

Returns

string

public get_serverObjectIsNull(): boolean

Returns

boolean

public get_serverTemplateCanCreateFolders(): boolean

Gets a value that indicates whether folders can be created within the list.

Returns

boolean

public get_templateFeatureId(): Guid

Gets a value that specifies the feature identifier of the feature that contains the list schema for the list.

Returns

Guid

public get_title(): string

Gets the list title. You can determine list URL from it's root folder URL.

Returns

string

public get_typedObject(): ClientObject

Returns

ClientObject

public get_userCustomActions(): UserCustomActionCollection

Gets collection of custom actions associated with the list.

Returns

UserCustomActionCollection

public get_validationFormula(): string

Gets a value that specifies the data validation criteria for a list item.

Returns

string

public get_validationMessage(): string

Gets a value that specifies the error message returned when data validation fails for a list item.

Returns

string

public get_views(): ViewCollection

Returns collection of views added to the list

Returns

ViewCollection

public get_workflowAssociations(): WorkflowAssociationCollection

Gets the collection of workflow association objects that represents all the workflows that are associated with the list.

Returns

WorkflowAssociationCollection

public isObjectPropertyInstantiated(propertyName: string): boolean

Parameters

  • propertyName: string

Returns

boolean

public isPropertyAvailable(propertyName: string): boolean

Parameters

  • propertyName: string

Returns

boolean

public recycle(): GuidResult

Sends the list to the site recycle bin.

Returns

GuidResult

public refreshLoad()

public renderListData(viewXml: string): StringResult

Returns the data for the specified query view.

Parameters

  • viewXml: string

Returns

StringResult

public renderListFormData(itemId: number, formId: string, mode: ControlMode): StringResult

Returns json string which contains all information necessary for rendering the specified list form for the specified itemId. Mode is SP.ControlMode

Parameters

Returns

StringResult

public reserveListItemId(): IntResult

This member is reserved for internal use and is not intended to be used directly from your code.

Returns

IntResult

public resetRoleInheritance()

public retrieve()

public retrieve(propertyNames: Array<string>)

Parameters

  • propertyNames: Array<string>

public saveAsNewView(oldName: string, newName: string, privateView: boolean, uri: string): StringResult

First tries to find if the view already exists. Overwrite it if yes, add a new view if no. Then extract all the adhoc filter/sort info from the URL and build and update the view's xml Returns the url of the new/overwritten view.

Parameters

  • oldName: string

    The name of the view the user did the adhoc filter on (is currently on).

  • newName: string

    The desired name the user typed

  • privateView: boolean

    Boolean true when the user wants make a new view that's personal

  • uri: string

    Url that keeps all the adhoc filter/sort inforatmion

Returns

StringResult

public set_contentTypesEnabled(value: boolean)

Sets a value that specifies whether content types are enabled for the list.

Parameters

  • value: boolean

public set_defaultContentApprovalWorkflowId(value: Guid)

Sets a value that specifies the default workflow identifier for content approval on the list.

Parameters

public set_defaultDisplayFormUrl(value: string)

Sets a value that specifies the location of the default display form for the list.

Parameters

  • value: string

public set_defaultEditFormUrl(value: string)

Sets a value that specifies the URL of the edit form to use for list items in the list.

Parameters

  • value: string

public set_defaultNewFormUrl(value: string)

Sets a value that specifies the location of the default new form for the list.

Parameters

  • value: string

public set_description(value: string)

Sets a value that specifies the description of the list.

Parameters

  • value: string

public set_direction(value: string)

Sets a value that specifies the reading order of the list.

Parameters

  • value: string

public set_documentTemplateUrl(value: string)

Sets a value that specifies the server-relative URL of the document template for the list

Parameters

  • value: string

public set_draftVersionVisibility(value: DraftVisibilityType)

Sets a value that specifies the minimum permission required to view minor versions and drafts within the list.

Parameters

public set_enableAttachments(value: boolean)

Sets a value that specifies whether list item attachments are enabled for the list.

Parameters

  • value: boolean

public set_enableFolderCreation(value: boolean)

Sets a value that specifies whether new list folders can be added to the list.

Parameters

  • value: boolean

public set_enableMinorVersions(value: boolean)

Sets a value that specifies whether minor versions are enabled for the list.

Parameters

  • value: boolean

public set_enableModeration(value: boolean)

Sets a value that specifies whether content approval is enabled for the list

Parameters

  • value: boolean

public set_enableVersioning(value: boolean)

Sets a value that specifies whether historical versions of list items and documents can be created in the list

Parameters

  • value: boolean

public set_forceCheckout(value: boolean)

Sets a value that indicates whether forced checkout is enabled for the document library

Parameters

  • value: boolean

public set_hidden(value: boolean)

Sets if the list is hidden from "All site contents" or not.

Parameters

  • value: boolean

public set_imageUrl(value: string)

Sets a value that specifies the URI for the icon of the list

Parameters

  • value: string

public set_irmEnabled(value: boolean)

Sets a value that specifies whether Information Rights Management (IRM) is enabled for the list.

Parameters

  • value: boolean

public set_irmExpire(value: boolean)

Sets a value that specifies whether Information Rights Management (IRM) expiration is enabled for the list.

Parameters

  • value: boolean

public set_irmReject(value: boolean)

Sets a value that specifies whether Information Rights Management (IRM) rejection is enabled for the list.

Parameters

  • value: boolean

public set_isApplicationList(value: boolean)

Sets a value that indicates whether this list should be treated as a top level navigation object or not.

Parameters

  • value: boolean

public set_lastItemModifiedDate(value: Date)

Sets a value that specifies the last time the list was modified.

Parameters

  • value: Date

public set_multipleDataList(value: boolean)

Sets a value that indicates whether the list in a Meeting Workspace site contains data for multiple meeting instances within the site

Parameters

  • value: boolean

public set_noCrawl(value: boolean)

Sets a value that specifies that the crawler must not crawl the list

Parameters

  • value: boolean

public set_objectVersion(value: string)

Parameters

  • value: string

public set_onQuickLaunch(value: boolean)

Sets a value that specifies whether the list appears on the Quick Launch of the site

Parameters

  • value: boolean

public set_title(value: string)

Sets the list title. To change list URL you should change name of the root folder.

Parameters

  • value: string

public set_validationFormula(value: string)

Sets a value that specifies the data validation criteria for a list item.

Parameters

  • value: string

public set_validationMessage(value: string)

Sets a value that specifies the error message returned when data validation fails for a list item.

Parameters

  • value: string

public update()

Updates the database with changes that are made to the list object.