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