Tuesday, February 25, 2014

How to get Guid of all form libraries

Hello,


two ways to get form libraries GUID from site:


1. Try to use below code to get all form libraries from site.



foreach (SPList list in web.lists)
{
if ((!list.Hidden) && (list.BaseType == SPBaseType.DocumentLibrary) && ((int) list.BaseTemplate == 115))

//you should get all infopath form libraries from sites

}

OR


2. Create a simple custom list and store all form library GUID''s in that list. Later you can call that list in your code and iterate all list items and pass GUID one by one in SPList class.


Hope it could help




Hemendra:Yesterday is just a memory,Tomorrow we may never see

Please remember to mark the replies as answers if they help and unmark them if they provide no help


No comments:

Post a Comment