I was getting access denied error while updating list items, I already tried to put my code into SPSecurity.RunWithElevatedPrivileges delegate, still I was getting error. Below was my actual code.
CODE:
//code line for updating list columns
Listitem.update()
List.Update()
After doing debugging and removing line by line from actual code I have figured out actual problem – the user who has contributor rights(normal user) was getting access denied error, admin users can able to update list without any problem, it’s because of LIST.UPDATE() statement, because contributor rights users don’t have permission to change anything into List settings, they can add/delete list items but they can’t able to change anything into list, after removing LIST.UPDATE() statement from my actual code, all users were able to successfully update the list items.
Enjoy!
Showing posts with label List Settings. Show all posts
Showing posts with label List Settings. Show all posts
Tuesday, January 26, 2010
Getting access denied error while updating list items
Labels:
Access denied,
access denied in list item,
Getting access denied error while updating list items,
List Settings,
List.Update(),
Listitem.update(),
MOSS 2007,
Personal Experience,
SharePoint,
SharePoint List,
SharePoint Object Model,
SPSecurity.Runwithelevatedprivileges,
SPSecurity.RunWithElevatedPrivileges delegate,
updating list items
Tuesday, May 5, 2009
How to find GUID of SharePoint list
Till now I came across many articles related to finding GUID of SharePoint list from SharePoint interface/GUI, but I think, below is easiest way to find GUID of list.
Go to respective List – >Click on Settings Menu – > Click on List Settings Link- > here in this list settings page, we can find many links, we need to click on “Audience targeting settings” link.
Now, currently we are in Audience targeting page, look up at the URL of current audience target page, that the current address have GUID of list, at the end of URL we can find GUID, like ?List={552bef05-b62c-4c76-a217-35e85a1507f1}
Go to respective List – >Click on Settings Menu – > Click on List Settings Link- > here in this list settings page, we can find many links, we need to click on “Audience targeting settings” link.
Now, currently we are in Audience targeting page, look up at the URL of current audience target page, that the current address have GUID of list, at the end of URL we can find GUID, like ?List={552bef05-b62c-4c76-a217-35e85a1507f1}
Subscribe to:
Posts (Atom)