NZWizard
asked on
Accessing Personal View in Sharepoint List
Hi Experts
I am farm admin in a SharePoint farm in my company . I want to know how many users having personal view in a SharePoint list? And users identity?
I want to do it programmatically. Any Idea how to achieve this?
Any help appreciated
I tried with following code but only giving me my personal view, not all personal views from all users.
string site = Convert.ToString(txtsiteUr l.Text);
string list = Convert.ToString(txtListNa me.Text);
SPSite spsite = new SPSite(site);
SPWeb spweb = spsite.OpenWeb();
SPList splist = spweb.Lists[list];
SPViewCollection views = splist.Views;
foreach (SPView view in views)
{
if (view.PersonalView)
{
Response.Write(view.Title + "</br>");
Response.Write(view.Views. Count + "</br>");
}
}
Thanks
I am farm admin in a SharePoint farm in my company . I want to know how many users having personal view in a SharePoint list? And users identity?
I want to do it programmatically. Any Idea how to achieve this?
Any help appreciated
I tried with following code but only giving me my personal view, not all personal views from all users.
string site = Convert.ToString(txtsiteUr
string list = Convert.ToString(txtListNa
SPSite spsite = new SPSite(site);
SPWeb spweb = spsite.OpenWeb();
SPList splist = spweb.Lists[list];
SPViewCollection views = splist.Views;
foreach (SPView view in views)
{
if (view.PersonalView)
{
Response.Write(view.Title + "</br>");
Response.Write(view.Views.
}
}
Thanks
ASKER
Hi raybies
Thanks for your reply.I have run the code under System Account but its not gettting access to personal view at all . Without system account I can get access to only my personal views not others .
Do you have any other ideas?
Thanks
Thanks for your reply.I have run the code under System Account but its not gettting access to personal view at all . Without system account I can get access to only my personal views not others .
Do you have any other ideas?
Thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
HI raybies
You are a savier ,
Thank you very very much it worked perpect..
You are a savier ,
Thank you very very much it worked perpect..
Hi Raybies/NZWizard,
It would be really very helpful if you share the powershell to delete a user's personal view for doc library, situation is like a user has exceeded number of personal views (50) and not able to access view now, getting error "The maximum number of web parts for all zones on this page has been exceeded"
Thanks in advance
It would be really very helpful if you share the powershell to delete a user's personal view for doc library, situation is like a user has exceeded number of personal views (50) and not able to access view now, getting error "The maximum number of web parts for all zones on this page has been exceeded"
Thanks in advance
SystemAccount.UserToken
Open in new window