2012-10-10 9 views
1

웹 서비스를 사용하여 Sharepoint 업데이트 목록을 작성했습니다. 네트워크 자격 증명을 사용하여 원격 서버에 액세스하고 있습니다. 여기 일괄 업데이트 (오류 코드 0x81020016)

mylist.Credentials = new NetworkCredential(_username, _password, _domain); 

내 innerXml 코드 : 불행히도

 StringBuilder innerXml = new StringBuilder(); 
       innerXml.AppendFormat("<Method ID='1' Cmd='Update'>" + 
       "<Field Name='ID'>" + id + "</Field>" + 
       "<Field Name='Title'>" + title + "</Field>" + 
       "<Field Name='CostCTRShortText'>" + CostCTRShortText + "</Field>" + 
       "<Field Name='ActTyp'>" + ActTyp + "</Field>" + 
       "<Field Name='Employee'>" + Employee + "</Field>" + 
       "<Field Name='Price'>" + Price + "</Field>" + 
       "<Field Name='ITECCategory'>" + ITECCategory + "</Field>" + 
       "<Field Name='ServicePrice'>" + ServicePrice + "</Field>" 
      ); 

     innerXml.AppendLine("</Method>"); 

내가 오류에 geting하고 때 업데이트 :

<Result ID="1,Update" xmlns="http://schemas.microsoft.com/sharepoint/soap/"><ErrorCode>0x81020016</ErrorCode><ErrorText>Item does not exist 

The page you selected contains an item that does not exist. It may have been deleted by another user.</ErrorText></Result> 

이 내용은 필자가 원격 서버에서 목록 항목을 업데이트 할 때 발생한다 . 동일한 코드가 작동하고 예상대로 로컬 사이트의 목록 항목을 업데이트합니다.

도와주세요.

+0

존재하지 않는 목록 항목을 업데이트하려고한다는 오류 메시지가 표시됩니다. 참조하고있는 ID가 실제로 원격 서버의 목록에 있는지 다시 확인 했습니까? – CBono

답변

0

문제점을 발견했습니다. 여기서 ID은 중요한 역할을합니다. ID 필드가 올바른 값을 검색하는지 확인하십시오. 필자의 경우 로컬 목록은 ID = 1 양식으로 시작하지만 프로덕션 서버 목록에는 ID = 1 인 행이 없습니다.

SharePoint 목록에서이 ID 열을 쉽게 볼 수 있습니다. 그리고 값을 확인하십시오.