Sharepoint Expiration Policy not working

I have a Sharepoint 2010 list with a custom content type with an associated retention policy. The policy consists of a custom formula and then the Send to Recycle Bin action. However, I realized that the items were not being deleted. I verified the list settings and the retention policy was configured:

CustomExpirationFormula

I run the Expiration Policy job several times but no items were deleted and no errors found in the logs. I also added logging to the custom formula but no logging was found neither. Finally, I found one thing that I didn’t know: There is another job that needs to be run before the Expiration Policy job, it is the Information Management Policy job.

The two are Sharepoint OOB jobs:

  • Expiration Policy: This job processes items that are due for a retention action, such as deleting items passed their expiration date.
  • Information Management Policy: This job performs background processing for information policies, such as calculating updated expiration dates for items with a new retention policy.

So as in this case I have a new retention policy, I needed to run this job first. When I did it, I got an error in the logs:

Error processing policy updates for site http://mysite.com for list MyList.

Error: Object reference not set to an instance of an object.

Source: Document Management Server

Event ID: 7997

Task Category: Information Policy Management

The error didn’t tell much, but after digging a little more I realized that the problem was that the custom expiration formula was not installed, so the Information Management Policy job couldn’t calculate the expiration date.

No Comments