Setting retention for a new object

You can apply a retention setting directly to an object when you create the object. The retention you specify for the object overrides the retention that is defined for the class.

About this task

You can set a retention setting for the following objects:
  • Documents
  • Annotations
  • Custom objects
  • Folders
If you create an object but do not specify a retention setting for the object, the retention for the object defaults to the retention period defined for the class. This might default to an object with no retention.

Procedure

To set retention for a new object:

  1. In the administration console, run the wizard to create a new object.
    1. In the domain navigation pane, select the object store.
    2. In the object store navigation pane, select Browse > Root Folder.
    3. Right-click the Root Folder or a folder under the Root Folder and click New Subfolder, New Document, or New Custom Object.
    4. Complete the wizard to create the object.
  2. Click the new object and select the Retention tab. Set retention for the object.

Modifying the retention setting for an existing object

An object can have a retention setting ranging from no retention, where the object can be deleted at anytime, to full retention, where the object can never be deleted. You can increase but not decrease the retention setting for an object.

Before you begin

To modify the retention setting of an object, you must first modify the retention permission.

Procedure

To change the retention setting of an existing object:

  1. In the administration console, access the retention settings for object.
    1. In the domain navigation pane, select the object store.
    2. In the object store navigation pane, select Browse > Root Folder.
    3. Click the Root Folder or a folder under the Root Folder. Open a folder if you are accessing a document or custom object.
  2. Click the object and select the Retention tab. Set retention for the object. The existing retention period can only be extended. You cannot set the retention date to an earlier date than the current setting or to no retention.

Setting retention by using custom events

You can create an event handler to directly manipulate the retention value for existing or new objects.

Procedure

To set or alter retention on an object:

Use the onEvent method to create a retention event handler.
For more information refer to Creating or modifying a custom event.

Setting retention by using custom code

You can use custom code to directly manipulate the retention value for objects.

Procedure

To set or alter retention on an object:

Change the value of the retention date property and save the object.
There are restrictions on retention value. For more information, see the retention date property.

Example

object.getProperties().putValue(PropertyNames.CM_RETENTION_DATE, retentionDateValue); or object.set_CmRetentionDate(retentionDateValue);