简体   繁体   中英

How do I check if a Sharepoint Document Library has the Require Approval flag set, using the Sharepoint API?

It would also be useful to be able to check the "Requires Checkout" flag as well. I thought it might be a property on the SPDocumentLibrary object, but I can't see it.

Do I need to look in one of the admin namespaces...?

Require approval is represented by the Boolean property EnableModeration on the Microsoft.SharePoint.SPList class. Require checkout is controlled by the property ForceCheckout on the same class. Remember to also call the Update() method on the SPList class to save your changes to the database.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM