Skip to content

Commit 7f943c5

Browse files
Update csom-methods-for-applying-retention-labels.md (SharePoint#9943)
* Learn Editor: Update csom-methods-for-applying-retention-labels.md * update Metadata * Learn Editor: Update csom-methods-for-applying-retention-labels.md * Learn Editor: Update csom-methods-for-applying-retention-labels.md * Learn Editor: Update csom-methods-for-applying-retention-labels.md * Update csom-methods-for-applying-retention-labels.md --------- Co-authored-by: Vesa Juvonen <[email protected]>
1 parent 767eb85 commit 7f943c5

File tree

1 file changed

+92
-5
lines changed

1 file changed

+92
-5
lines changed

docs/apis/csom-methods-for-applying-retention-labels.md

Lines changed: 92 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
---
2-
title: CSOM methods for applying retention labels
3-
description: CSOM methods are available to apply (set) a retention label (ComplianceTag) on one or many items (ListItems) in SharePoint.
2+
title: CSOM methods for retention labels
3+
description: CSOM methods are available to apply (set) a retention label (ComplianceTag) on one or many items (ListItems) in SharePoint. Also includes settings of retention labels in ODB and SPO.
44
author: kyracatwork
55
ms.author: kyrachurney
6-
ms.date: 4/18/2023
6+
ms.date: 9/30/2024
77
---
88

9-
# CSOM methods for applying retention labels (setting ComplianceTags)
9+
# CSOM methods for applying retention labels and managing settings of record labels
1010

1111
Retention labels let you apply retention settings for governance control at the item level, and are part of the Microsoft Purview compliance solutions. [Learn more about retention labels.](/microsoft-365/compliance/retention#retention-labels)
1212

1313
Retention labels may classify contents as records, which place restrictions on what actions are allowed or blocked. [Learn more about declaring records by using retention labels](/microsoft-365/compliance/declare-records)
1414

15-
CSOM methods are available to apply (set) a retention label (ComplianceTag) on one or many items (ListItems) in SharePoint. Retention labels can be applied using this method without being published to the ___location by an existing label policy.
15+
CSOM methods are available to apply (set) a retention label (ComplianceTag) on one or many items (ListItems) in SharePoint, and change retention labels settings for deleting, versioning, and changing properties of records. Retention labels can be applied using this method without being published to the ___location by an existing label policy.
1616

1717
## SetComplianceTagOnBulkItems
1818

@@ -34,6 +34,93 @@ public List<int> SetComplianceTagOnBulkItems(
3434

3535
Attribute [RemoteAttribute](/dotnet/api/microsoft.sharepoint.client.remoteattribute)
3636

37+
## GetAllowFilesWithKeepLabelToBeDeletedODB
38+
39+
Get whether files with Keep Label can be deleted in ODB.
40+
41+
42+
```c#
43+
44+
public static bool GetAllowFilesWithKeepLabelToBeDeletedODB()
45+
```
46+
47+
## SetAllowFilesWithKeepLabelToBeDeletedODB
48+
49+
Set whether files with Keep Label can be deleted in ODB
50+
51+
52+
```c#
53+
public static void SetAllowFilesWithKeepLabelToBeDeletedODB(bool allowDeletion)
54+
```
55+
56+
Parameters
57+
58+
- 'allowDeletion' [Boolean](/dotnet/api/system.boolean)
59+
60+
## GetAllowFilesWithKeepLabelToBeDeletedSPO
61+
Get whether files with Keep Label can be deleted in SPO.
62+
63+
```c#
64+
65+
public static bool GetAllowFilesWithKeepLabelToBeDeletedSPO()
66+
```
67+
68+
## SetAllowFilesWithKeepLabelToBeDeletedSPO
69+
70+
Set whether files with Keep Label can be deleted in SPO.
71+
72+
```c#
73+
public static void SetAllowFilesWithKeepLabelToBeDeletedSPO(bool allowDeletion)
74+
```
75+
76+
Parameters
77+
78+
- 'allowDeletion' [Boolean](/dotnet/api/system.boolean)
79+
80+
## GetAdvancedRecordVersioningDisabled
81+
82+
Get whether advanced record versioning is disabled.
83+
84+
```c#
85+
86+
public static bool GetAdvancedRecordVersioningDisabled()
87+
```
88+
89+
## SetAdvancedRecordVersioningDisabled
90+
91+
Set to enable or disable the advanced record versioning.
92+
93+
```c#
94+
public static void SetAdvancedRecordVersioningDisabled(bool disabled)
95+
```
96+
97+
Parameters
98+
99+
- 'disabled' [Boolean](/dotnet/api/system.boolean)
100+
101+
## GetMetadataEditBlockingEnabled
102+
103+
Get whether metadata edit blocking is enabled.
104+
105+
```c#
106+
107+
public static bool GetMetadataEditBlockingEnabled()
108+
109+
```
110+
111+
## SetMetadataEditBlockingEnabled
112+
113+
Set metadata edit blocking enabled setting.
114+
115+
116+
```c#
117+
public static void SetMetadataEditBlockingEnabled(bool enabled)
118+
```
119+
120+
Parameters
121+
122+
- 'enabled' [Boolean](/dotnet/api/system.boolean)
123+
37124
### Applies to
38125

39126
|Product|Versions|

0 commit comments

Comments
 (0)