Skip to main content

spo listitem record declare

Declares the specified list item as a record

Usage

m365 spo listitem record declare [options]

Options

-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 either listTitle, listId or listUrl

-t, --listTitle [listTitle]

The title of the list where the item is located. Specify either listTitle, listId or listUrl

--listUrl [listUrl]

Server- or site-relative URL of the list. Specify either listTitle, listId or listUrl

-i, --listItemId <listItemId>

The ID of the list item to declare as record

-d, --date [date]

Record declaration date in ISO format. eg. 2019-12-31

-h, --help [help]

Output usage information. Optionally, specify which section of command's help you want to see. Allowed values are options, examples, remarks, response, full. Default is options.

--query [query]

JMESPath query string. See http://jmespath.org/ for more information and examples.

-o, --output [output]

Output type. json, text, csv, md, none. Default json.

--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

m365 spo listitem record declare --webUrl https://contoso.sharepoint.com/sites/project-x --listTitle "Demo List" --listItemId 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

m365 spo listitem record declare --webUrl https://contoso.sharepoint.com/sites/project-x --listId ea8e1109-2013-1a69-bc05-1403201257fc --listItemId 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

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

Declare a document with a specific id as a record with a record declaration date a list retrieved by server-relative URL located in a specific site

m365 spo listitem record declare --webUrl https://contoso.sharepoint.com/sites/project-x --listUrl '/sites/project-x/Lists/Demo List' --listItemId 1 --date 2013-09-03

Response

{
"SchemaVersion": "15.0.0.0",
"LibraryVersion": "16.0.23102.12004",
"ErrorInfo": null,
"TraceCorrelationId": "064779a0-d05b-5000-843d-c36803e58f12"
}
CTRL + M