1

Part of my solution manages Information Policies. I'm trying to find out if it is possible to access a particular setting from the object model. On the Edit Policy page, you can specify a different retention stage for Records, but I don't see where that settings exists in CustomData for the PolicyItem, the Policy, or some random statically accessible class.

Is it possible to change this setting and if so, how would I do that from the object model?

Second part of the question, even if this option is set to use the same policy for records and non-records, I know the record stages exist. Toggling the radio button will show my inserted stages. But I don't know if the setting will prevent these from being considered as part of the overall retention policy if it isn't set to use a different policy for records.

In case you're visual, here is the relevant setting from the Edit Policy page. :)

Appreciate any help.

Edit Policy Setting for Retention of Records

0

I can't speak to the second part of your question about whether this setting would cause separately defined records policy to be ignored or not if it isn't set to use a different policy for records, but here's an answer to the first part of your question about how to set this through the object model:

If you're using Content Types as your Source of Retention then the "Define different retention states for records" setting lives inside the PolicyItem.CustomData retention XML. You need to define a default="false" attribute on the root <Schedules> element in order to enable separate retention policy for records.

If you're using Library and Folders as your Source of Retention then the same setting is done through the same retention XML, you just set it using ListPolicySettings.SetRetentionSchedule and GetRetentionSchedule methods instead of CustomData.

Here's an example retention XML I'm using for a library. In the example non-records has no stages defined, whereas records have one stage which permanently deletes the record on InvoiceDate + 10 years (InvoiceDate is a custom column on my library):

<Schedules nextStageId="2" default="false">
    <Schedule type="Default">
        <stages />
    </Schedule>
    <Schedule type="Record">
        <stages>
            <data stageId="1">
                <formula id="Microsoft.Office.RecordsManagement.PolicyFeatures.Expiration.Formula.BuiltIn">
                    <number>10</number>
                    <property>InvoiceDate</property>
                    <propertyId>00000000-0000-0000-0000-000000000000</propertyId>
                    <period>years</period>
                </formula>
                <action type="action" id="Microsoft.Office.RecordsManagement.PolicyFeatures.Expiration.Action.Delete" />
            </data>
        </stages>
    </Schedule>
</Schedules>

Here's a screenshot of SharePoint interface configured using the above retention XML:

screenshot of retention policy page

  • Well, I am actually very surprised anyone bothered to respond to this old question. I figured I broke the internet. Thanks for the response. I am two years removed from this project and no longer play in the ERM abyss inside SharePoint. I'm going to mark your response as the answer. – cp79shark Oct 15 '15 at 9:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.