Sebastian 506563 Sebastian 506563 - 5 months ago 40
C# Question

Client object model get item by id "Item does not exist. It may have been deleted by another user"

I am getting error while i try execute list item by id

ClientContext clientContext = TokenHelper.GetClientContextWithAccessToken(sharepointUrl.ToString(), accessToken);
Web web = clientContext.Web;
currentUser = clientContext.Web.CurrentUser.Title;
List _list = web.Lists.GetById(_ListGuid);
Microsoft.SharePoint.Client.ListItem _item = _list.GetItemById(ItemID);
clientContext.ExecuteQuery(); //ERROR HERE

error :

Item does not exist. It may have been deleted by another user.

item exist, i am new at client object model, List object show me item count and its fine, i cant just take ListItem object... i know this is something very simple but still i spent so much time at this simply thing

Answer Source

The problem was in the permission in the manifest file, and while you are deploying the app, SharePoint asks you about "trust" then you have to choose the list which you want to operate with.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download