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
- Documents
- Annotations
- Custom objects
- Folders
Procedure
To set retention for a new 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
Procedure
To change the retention setting of an existing object:
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);