You can create an event handler to directly manipulate the retention value for objects.
To set or alter retention on an object: