Interface IListItem
Public interface to define a SharePoint Online list item
Assembly: PnP.Core.dll
Syntax
public interface IListItem : IDataModel<IListItem>, IDataModelParent, IDataModelWithContext, ISupportModules<IListItem>, IDataModelGet<IListItem>, IDataModelLoad<IListItem>, IDataModelUpdate, IDataModelDelete, IDataModelSupportingGetChanges, ISecurableObject, IExpandoDataModel, IQueryableDataModel
Properties
A special property used to add an asterisk to a $select statement
Declaration
Property Value
Declaration
IAttachmentCollection AttachmentFiles { get; }
Property Value
The content type for the list item
Declaration
IContentType ContentType { get; }
Property Value
All the field values for the list item as HTML
Declaration
IFieldStringValues FieldValuesAsHtml { get; }
Property Value
All the field values for the list item as text
Declaration
IFieldStringValues FieldValuesAsText { get; }
Property Value
All the field values for the list item for editing
Declaration
IFieldStringValues FieldValuesForEdit { get; }
Property Value
The file, if any, associated with the list item
Declaration
Property Value
Declaration
FileSystemObjectType FileSystemObjectType { get; }
Property Value
The folder, if any, represented by the list item
Declaration
Property Value
Declaration
Property Value
The list for the list item
Declaration
IList ParentList { get; }
Property Value
The properties of the list item
Declaration
IPropertyValues Properties { get; }
Property Value
The URI used to render the WOPI (Web Application Open Platform Interface) frame
Declaration
string ServerRedirectedEmbedUri { get; }
Property Value
The URL used to render the WOPI (Web Application Open Platform Interface) frame
Declaration
string ServerRedirectedEmbedUrl { get; }
Property Value
Title value of the list item
Declaration
string Title { get; set; }
Property Value
The unique identifier of the list item
Declaration
Property Value
Declaration
IListItemVersionCollection Versions { get; }
Property Value
Methods
Checks if a user has a specific kind of permissions to a listitem
Declaration
bool CheckIfUserHasPermissions(string userPrincipalName, PermissionKind permissionKind)
Parameters
System.String
userPrincipalName
Login name of the user you wish to check if he has a specific permission
|
PermissionKind
permissionKind
Permission kind to check
|
Returns
System.Boolean
Boolean that says if the user has permissions or not
|
Checks if a user has a specific kind of permissions to a listitem
Declaration
Task<bool> CheckIfUserHasPermissionsAsync(string userPrincipalName, PermissionKind permissionKind)
Parameters
System.String
userPrincipalName
Login name of the user you wish to check if he has a specific permission
|
PermissionKind
permissionKind
Permission kind to check
|
Returns
Task<System.Boolean>
Boolean that says if the user has permissions or not
|
Creates an anonymous sharing link for a list item
Declaration
IGraphPermission CreateAnonymousSharingLink(AnonymousLinkOptions anonymousLinkOptions)
Parameters
Returns
Creates an anonymous sharing link for a list item
Declaration
Task<IGraphPermission> CreateAnonymousSharingLinkAsync(AnonymousLinkOptions anonymousLinkOptions)
Parameters
Returns
Creates an organization sharing link for a list item
Declaration
IGraphPermission CreateOrganizationalSharingLink(OrganizationalLinkOptions organizationalLinkOptions)
Parameters
Returns
Creates an organization sharing link for a list item
Declaration
Task<IGraphPermission> CreateOrganizationalSharingLinkAsync(OrganizationalLinkOptions organizationalLinkOptions)
Parameters
Returns
Creates a user sharing link for a list item
Declaration
IGraphPermission CreateUserSharingLink(UserLinkOptions userLinkOptions)
Parameters
Returns
Creates a user sharing link for a list item
Declaration
Task<IGraphPermission> CreateUserSharingLinkAsync(UserLinkOptions userLinkOptions)
Parameters
Returns
Gets the display name of the list item.
Declaration
Returns
System.String
The display name or null .
|
Gets the display name of the list item.
Declaration
Task<string> GetDisplayNameAsync()
Returns
Task<System.String>
The display name or null .
|
Returns the IFolder that holds this item
Declaration
IFolder GetParentFolder()
Returns
IFolder
The IFolder for this item is returned, if the item itself is a folder then the item is returned as IFolder.
|
Returns the IFolder that holds this item
Declaration
Task<IFolder> GetParentFolderAsync()
Returns
Task<IFolder>
The IFolder for this item is returned, if the item itself is a folder then the item is returned as IFolder.
|
Gets the user effective permissions of a user for a listitem
Declaration
IBasePermissions GetUserEffectivePermissions(string userPrincipalName)
Parameters
System.String
userPrincipalName
Login name of the user you wish to retrieve the permissions of
|
Returns
IBasePermissions
Base permissions object that contains the High and the Low permissions
|
Gets the user effective permissions of a user for a listitem
Declaration
Task<IBasePermissions> GetUserEffectivePermissionsAsync(string userPrincipalName)
Parameters
System.String
userPrincipalName
Login name of the user you wish to retrieve the permissions of
|
Returns
Task<IBasePermissions>
Base permissions object that contains the High and the Low permissions
|
Declaration
Returns
System.Boolean
Returns true if this IListItem is a file.
|
Declaration
Returns
Task<System.Boolean>
Returns true if this IListItem is a file.
|
Declaration
Returns
System.Boolean
Returns true if this IListItem is a folder.
|
Declaration
Task<bool> IsFolderAsync()
Returns
Task<System.Boolean>
Returns true if this IListItem is a folder.
|
Moves this ListItem to another folder in this list
Declaration
void MoveTo(string destinationFolderUrl)
Parameters
System.String
destinationFolderUrl
Folder path within this list, e.g. 'subfolder1/subfolder2'
|
Moves this ListItem to another folder in this list
Declaration
Task MoveToAsync(string destinationFolderUrl)
Parameters
System.String
destinationFolderUrl
Folder path within this list, e.g. 'subfolder1/subfolder2'
|
Returns
Declaration
IFieldLookupValue NewFieldLookupValue(IField fieldToUpdate, int lookupId)
Parameters
IField
fieldToUpdate
IField representing the field to set
|
System.Int32
lookupId
Id of the lookup value
|
Returns
Declaration
IFieldTaxonomyValue NewFieldTaxonomyValue(IField fieldToUpdate, Guid termId, string label, int wssId = null)
Parameters
IField
fieldToUpdate
IField representing the field to set
|
Guid
termId
Name of the term to set
|
System.String
label
Label of the term to set
|
System.Int32
wssId
Optionally provide the wssId value
|
Returns
Declaration
IFieldUrlValue NewFieldUrlValue(IField fieldToUpdate, string url, string description = null)
Parameters
IField
fieldToUpdate
IField representing the field to set
|
System.String
url
Url value
|
System.String
description
Optional description value
|
Returns
Declaration
IFieldUserValue NewFieldUserValue(IField fieldToUpdate, ISharePointPrincipal principal)
Parameters
Returns
Declaration
IFieldUserValue NewFieldUserValue(IField fieldToUpdate, int userId)
Parameters
IField
fieldToUpdate
IField representing the field to set
|
System.Int32
userId
Id of the user
|
Returns
Declaration
IFieldValueCollection NewFieldValueCollection(IField fieldToUpdate)
Parameters
Returns
Declaration
Task<Guid> RecycleAsync()
Returns
Declaration
IBatchSingleResult<BatchResultValue<Guid>> RecycleBatch()
Returns
Declaration
IBatchSingleResult<BatchResultValue<Guid>> RecycleBatch(Batch batch)
Parameters
Batch
batch
Batch to add the request to
|
Returns
Declaration
Task<IBatchSingleResult<BatchResultValue<Guid>>> RecycleBatchAsync()
Returns
Declaration
Task<IBatchSingleResult<BatchResultValue<Guid>>> RecycleBatchAsync(Batch batch)
Parameters
Batch
batch
Batch to add the request to
|
Returns
Sets a compliancetag / retention label for this list item
Declaration
void SetComplianceTag(string complianceTag, bool isTagPolicyHold, bool isTagPolicyRecord, bool isEventBasedTag, bool isTagSuperLock)
Parameters
System.String
complianceTag
The tag/label to set for this list item
|
System.Boolean
isTagPolicyHold
Whether the tag is hold
|
System.Boolean
isTagPolicyRecord
Whether the tag is record
|
System.Boolean
isEventBasedTag
Whether the tag is Event based, this is not used
|
System.Boolean
isTagSuperLock
Whether the tag is Sec 17 tag,no allow change even for site admin
|
Sets a compliancetag / retention label for this list item
Declaration
Task SetComplianceTagAsync(string complianceTag, bool isTagPolicyHold, bool isTagPolicyRecord, bool isEventBasedTag, bool isTagSuperLock)
Parameters
System.String
complianceTag
The tag/label to set for this list item
|
System.Boolean
isTagPolicyHold
Whether the tag is hold
|
System.Boolean
isTagPolicyRecord
Whether the tag is record
|
System.Boolean
isEventBasedTag
Whether the tag is Event based, this is not used
|
System.Boolean
isTagSuperLock
Whether the tag is Sec 17 tag,no allow change even for site admin
|
Returns
Sets a compliancetag / retention label for this list item
Declaration
void SetComplianceTagBatch(Batch batch, string complianceTag, bool isTagPolicyHold, bool isTagPolicyRecord, bool isEventBasedTag, bool isTagSuperLock)
Parameters
Batch
batch
Batch to add the request to
|
System.String
complianceTag
The tag/label to set for this list item
|
System.Boolean
isTagPolicyHold
Whether the tag is hold
|
System.Boolean
isTagPolicyRecord
Whether the tag is record
|
System.Boolean
isEventBasedTag
Whether the tag is Event based, this is not used
|
System.Boolean
isTagSuperLock
Whether the tag is Sec 17 tag,no allow change even for site admin
|
Sets a compliancetag / retention label for this list item
Declaration
void SetComplianceTagBatch(string complianceTag, bool isTagPolicyHold, bool isTagPolicyRecord, bool isEventBasedTag, bool isTagSuperLock)
Parameters
System.String
complianceTag
The tag/label to set for this list item
|
System.Boolean
isTagPolicyHold
Whether the tag is hold
|
System.Boolean
isTagPolicyRecord
Whether the tag is record
|
System.Boolean
isEventBasedTag
Whether the tag is Event based, this is not used
|
System.Boolean
isTagSuperLock
Whether the tag is Sec 17 tag,no allow change even for site admin
|
Sets a compliancetag / retention label for this list item
Declaration
Task SetComplianceTagBatchAsync(Batch batch, string complianceTag, bool isTagPolicyHold, bool isTagPolicyRecord, bool isEventBasedTag, bool isTagSuperLock)
Parameters
Batch
batch
Batch to add the request to
|
System.String
complianceTag
The tag/label to set for this list item
|
System.Boolean
isTagPolicyHold
Whether the tag is hold
|
System.Boolean
isTagPolicyRecord
Whether the tag is record
|
System.Boolean
isEventBasedTag
Whether the tag is Event based, this is not used
|
System.Boolean
isTagSuperLock
Whether the tag is Sec 17 tag,no allow change even for site admin
|
Returns
Sets a compliancetag / retention label for this list item
Declaration
Task SetComplianceTagBatchAsync(string complianceTag, bool isTagPolicyHold, bool isTagPolicyRecord, bool isEventBasedTag, bool isTagSuperLock)
Parameters
System.String
complianceTag
The tag/label to set for this list item
|
System.Boolean
isTagPolicyHold
Whether the tag is hold
|
System.Boolean
isTagPolicyRecord
Whether the tag is record
|
System.Boolean
isEventBasedTag
Whether the tag is Event based, this is not used
|
System.Boolean
isTagSuperLock
Whether the tag is Sec 17 tag,no allow change even for site admin
|
Returns
Performs a system update of the list item
Declaration
Performs a system update of the list item
Declaration
Returns
Performs a system update of the list item
Declaration
Performs a system update of the list item
Declaration
void SystemUpdateBatch(Batch batch)
Parameters
Batch
batch
Batch to add the systemupdate request to
|
Performs a system update of the list item
Declaration
Task SystemUpdateBatchAsync()
Returns
Performs a system update of the list item
Declaration
Task SystemUpdateBatchAsync(Batch batch)
Parameters
Batch
batch
Batch to add the systemupdate request to
|
Returns
Performs a UpdateOverwriteVersion of the list item
Declaration
void UpdateOverwriteVersion()
Performs a UpdateOverwriteVersion of the list item
Declaration
Task UpdateOverwriteVersionAsync()
Returns
Performs a UpdateOverwriteVersion of the list item
Declaration
void UpdateOverwriteVersionBatch()
Performs a UpdateOverwriteVersion of the list item
Declaration
void UpdateOverwriteVersionBatch(Batch batch)
Parameters
Batch
batch
Batch to add the UpdateOverwriteVersion request to
|
Performs a UpdateOverwriteVersion of the list item
Declaration
Task UpdateOverwriteVersionBatchAsync()
Returns
Performs a UpdateOverwriteVersion of the list item
Declaration
Task UpdateOverwriteVersionBatchAsync(Batch batch)
Parameters
Batch
batch
Batch to add the UpdateOverwriteVersion request to
|
Returns
Extension Methods