0 comments on “Using RunWithElevatedPrivileges in SharePoint”

Using RunWithElevatedPrivileges in SharePoint

As users browse and use SharePoint, the content is retrieved and written under the context of that user, therefore, they can only read and write to what they have permissions to. When developing custom components in SharePoint, whether it be a web part, application page, event handler, etc.…, developers often need to...

Advertisements
0 comments on “How to set an Expiration Policy through code”

How to set an Expiration Policy through code

I've been working on a project that requires custom site provisioning through code based on the information a user completes in a form.  A workflow creates a new site collection, sub site, and a list within the sub site. It also sets some basic security and adds a custom content type to the site collection (which is used by the list).

Another requirement was to delete any items in the list that past a 72 month expiration. A SharePoint Information Management Policy would work to...