Recently our client project had a requirement where a document type (or a content type) should be audited for its events such as editing items and checking in and checking out items, and also the policy should be reusable for other content type when we need. When I consult my architect he in instruct me how to do it. So I thought to share how I did this.
- First of all you have to create a policy.
- To create Go to Site Setting -> Select Content Type Policy Templates (under Site Collection Administration category).
- There select Create. The Url will end with “_layouts/15/policyconfig.aspx”.
- Create a policy as you need. As per to my requirement I need an auditing policy. I created a policy enabling Auditing by selecting Enable Auditing option – Please refer the screenshot given below.
- Then Select the content type which you should enable auditing. You can select the content type by going to Site Setting -> Click Site content types (under Web Designer Galleries) -> Select the content type you wish to add the policy.
- In case you don’t have a content type; to create go to Site Setting -> Click Site content types (under Web Designer Galleries )
- Select Create option on the top and create a content type as you need.
- Select the “Information management policy settings” under setting.
- You will see something like this.
- There select “Use a site collection policy:” (the 3rd option) and select your policy name and click OK.
- Now you have associated the auditing policy with the content type.
- Your logs reports can be seen under Go to Site settings -> Site Collection Administration -> Audit log reports.
You can also create a new policy at the Content Type -> Information management policy settings. But this will applicable only for the specific content type and you cannot be reusable for other content types; simply its a content type policy and not a site collection policy.