Sharepoint Forum

Ask Question   UnAnswered
Home » Forum » Sharepoint       RSS Feeds

Programmatically update "Author" field using Web Services

  Asked By: Audrey    Date: Nov 05    Category: Sharepoint    Views: 7782

Is it possible to programmatically update the default field "Author"
(Created By) using Web Services (UpdateListItems() - List.asmx) ?

I made some tests and I'm able to update the field "Created" but not
this field.



7 Answers Found

Answer #1    Answered By: Adalberto Merrill     Answered On: Nov 05

Are you getting an error????????????????

Answer #2    Answered By: Lynsey Carver     Answered On: Nov 05

I'm not getting an error. I'm able to change the field  "Created", but
not the field "Author" (or Created By) using web  services, nothing

Do you have an idea ?

Answer #3    Answered By: Richard Allen     Answered On: Nov 05

I have used EventHandlers to update  the "Author" column don't know about web
services but shouldn't be different. Having said that, are you using
impersonation/elivated previledges?

Answer #4    Answered By: Ian Davis     Answered On: Nov 05

I finally found how to do it. I don't a lot of experience with
SharePoint. You must set the field  attribute ReadOnly to False with
the UpdateList() method. After, you can set programmatically  the
fields Author, Editor, Created and Modified with the UpdateListItems
() method.

I don't why, but my field was set to ReadOnly=False. It's the reason
why I was able to update  the field Created. I did a lot of tests and
I probably change this attribute in my tests ... and it's the reason
I was able to do it.

Answer #5    Answered By: Jagjit Hui     Answered On: Nov 05

...and you didn't get an error when you tried to update  a Read-Only field?

Answer #6    Answered By: Manan Kadu     Answered On: Nov 05

I didn't get an error (or exception) when I update
the item with UpdateListItems method.

The return value gives an error code = 0 (no error).

Didn't find what you were looking for? Find more on Programmatically update "Author" field using Web Services Or get search suggestion and latest updates.