本文介绍了客户端对象模型度日ID&QUOT项目;项目不存在。它可能已被另一用户QUOT删除;的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我得到错误,而我试图通过ID

  ClientContext clientContext = TokenHelper.GetClientContextWithAccessToken(sharepointUrl.ToString执行列表项( )的accessToken); 
的Web网页= clientContext.Web;
clientContext.Load(网络);
clientContext.ExecuteQuery();
clientContext.Load(web.CurrentUser);
clientContext.ExecuteQuery();
的currentUser = clientContext.Web.CurrentUser.Title;
名单_list = web.Lists.GetById(_ListGuid);
clientContext.Load(_list);
clientContext.ExecuteQuery();
Microsoft.SharePoint.Client.ListItem _item = _list.GetItemById(项目编号);
clientContext.Load(_item);
clientContext.ExecuteQuery(); // ERROR HERE
的Response.Write(_item [作者]的ToString());



错误:



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

解决方案

the problem was in the permission in the manifest file, and while you are deploying the app, sharepoint ask you about "trust" then u have to choose the list wich u want to operate with

这篇关于客户端对象模型度日ID&QUOT项目;项目不存在。它可能已被另一用户QUOT删除;的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-13 01:38