I have a SharePoint library with the following folder structure pr. Customer:
Customer 1, subfolder1=Products, subfolder2=Tests, subfolder3= Trades
Customer, 2 subfolder1=Products, subfolder2=Tests, subfolder3=Trades
I wish to add a Retention Policy to each of the Trades folders. I want to do this using code whenever a new Trades folder is created.
Searching Google i found that it is possible to create the retention policy using code: https://blogs.msdn.microsoft.com/jfrost/2011/03/15/setting-custom-expiration-programmatically/ and add it to a folder level: https://msdn.microsoft.com/en-us/library/ee571406.aspx
How do can i write code to trigger this whenever a new Trades folder is created in the library?
Does anyone know if this is possible in SharePoint Server 2016. All documentation is in SharePoint 2010.