Updating Page library who have approval workflow attached

Nov 18, 2010 at 3:44 AM

Hi,

I have a case when i need to update a column of page library through SpService's UpdateListItems method.

Its updating it successfully but leaves that page in draft mode.

i need to make sure it approve that item.

Please suggest.

Coordinator
Nov 18, 2010 at 3:54 AM

Take a look at CheckInFile. If you aren't using Checkout, then you probably can just update the approval status when you update the item. I haven't tried this, so let me know how it works!

M.

Nov 18, 2010 at 5:31 PM

No... It didn't work.

Coordinator
Nov 22, 2010 at 2:13 AM

airwings17:

Please use the Discussion here rather than the Wiki pages if you have questions. (There's no alerting on the Wiki pages.)

You said:

I have two questions.
1. Can i modify and approve the page library item through 'UpdateList' method ?
Currently its leaving the page in draft mode after making modification.
2. How can i run UpdateList method through SPservice using administrator privileges, just like we do in our code behind by SPSecurity.RunWithElevatedPrivilege. I need to make anonymous user update my list through this web service.

  1. UpdateList is used to update attributes of the list iteself, not the items. You need to use UpdateListItems.
  2. There is no impersonation option for the Web Services; they always run under your current credentials.

M.

Nov 23, 2010 at 3:58 AM

Thanks sympmarc.

I was needed that straight answer.