mardi 6 janvier 2015

Find out Custom List created by user



I need to fetch all custom lists which are created by any end user.


How can I do that?


What I need to do is


Using this:



private void GetAllCustomList()
{
using (SPSite oSite = new SPSite(AppName))
{
using (SPWeb oWeb = oSite.OpenWeb())
{
// SPListCollection docLibraryColl = oWeb.GetListsOfType(SPBaseType.UnspecifiedBaseType);

foreach (SPList list in oWeb.Lists)
{
if (list.BaseType == SPBaseType.GenericList && list.BaseTemplate == SPListTemplateType.GenericList)
Response.Write(list.Title + ", " + list.Author.ToString() + "<br>");

}
}
}

}


but it gives me lots of default List too.








0 commentaires:

Enregistrer un commentaire