Unable to Update Sharepoint Document Properties: Required Fields are Empty
Asked Answered
S

2

8

I am updating Documents on Sharepoint using the List.asmx web service.

But problem I am facing is:

  1. Fields are not getting updated as some of required fields are not added. But to fill required fields I have to Update again.
  2. "ID" field is compulsary at the time of Update. Which we get only after uploading Document. (We get this id by "ows_id" attribute value.)

Edit: As said by "Janis Veinbergs" We can't get this ID until document is actualy saved. So how will I update document as ID field is must for Update?

If I don't Put ID Field:

Error : 0x8102000aInvalid URL Parameter The URL provided contains an invalid Command or Value. Please check the URL again.

If I put Null Value to it:

Error :0x81020016Item does not exist The page you selected contains an item that does not exist. It may have been deleted by another user.

Is there any way to set document properties at the time of uploading files on Sharepoint?

****Note: I am uploading file in Chunck.And Not using Microsoft.sharepoint.dll **** Language: C#.

I tried this code. But here again properties are being set after uploading file.

Simulacrum answered 10/3, 2010 at 11:2 Comment(0)
H
1

number 2 -> One is for sure - you can't get database row ID of document before it is actually saved into database.

Hauge answered 10/3, 2010 at 12:24 Comment(0)
C
1

The page linked to in the question actually links to a newer option using a FrontPage RPC method to post documents to SharePoint: http://geek.hubkey.com/2007/11/upload-file-to-sharepoint-document.html

I would use that instead.

If you need to upload multiple files, you can use this method. If you need to upload one file, try this one.

Cottier answered 1/5, 2010 at 22:32 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.