I’ve been writing code that will create a new content type in the site collection root with a retention policy, the create a new library using that content type. I kept getting the following error when opening up the “Compliance Details” window for new documents in my new library: “Column ‘_dlc_Exempt” does not exist. It may have been deleted by another user.”
Column _dlc_Exempt is a hidden column that’s part of Records Management in SharePoint Server that indicates whether a document is allowed to be exempt from a retention policy. It almost seemed as if the content type was still in the process of having these additional columns attached to it when my code was going ahead and provisioning the library that used the content type, so my library didn’t get these new columns added to it, which the content type needed when trying to display the “Compliance Details” widow.
The solution to the problem was simple: I just needed to make sure my new retention policy got added to the site collection content type after I provisioned my new library that used it. The content type in the library will automatically pick up the retention policy applied to the same content type in the site collection.