Skip to content

spo listitem record declare

Declares the specified list item as a record

Usage

spo listitem record declare [options]

Options

Option Description
--help output usage information
-u, --webUrl <webUrl> URL of the site where the list is located
-l, --listId [listId] The ID of the list where the item is located. Specify listId or listTitle but not both
-t, --listTitle [listTitle] The title of the list where the item is located. Specify listId or listTitle but not both
-i, --id <id> The ID of the list item to declare as record
-d, --date [date] Record declaration date in ISO format. eg. 2019-12-31
--verbose Runs command with verbose logging
--debug Runs command with debug logging

Examples

Declare a document with id 1 as a record in list with title Demo List located in site https://contoso.sharepoint.com/sites/project-x

spo listitem record declare --webUrl https://contoso.sharepoint.com/sites/project-x --listTitle "Demo List" --id 1

Declare a document with id 1 as a record in list with id ea8e1109-2013-1a69-bc05-1403201257fc located in site https://contoso.sharepoint.com/sites/project-x

spo listitem record declare --webUrl https://contoso.sharepoint.com/sites/project-x --listId ea8e1109-2013-1a69-bc05-1403201257fc --id 1

Declare a document with id 1 as a record with record declaration date March 14, 2012 in list with title Demo List located in site https://contoso.sharepoint.com/sites/project-x

spo listitem record declare --webUrl https://contoso.sharepoint.com/sites/project-x --listTitle "Demo List" --id 1 --date 2012-03-14

Declare a document with id 1 as a record with record declaration date September 3, 2013 in list with id ea8e1356-5910-abc9-bc05-2408198057fc located in site https://contoso.sharepoint.com/sites/project-x

spo listitem record declare --webUrl https://contoso.sharepoint.com/sites/project-x --listId ea8e1356-5910-abc9-bc05-2408198057fc --id 1 --date 2013-09-03