Quantcast
Channel: SharePoint 2010 - Development and Programming forum
Viewing all articles
Browse latest Browse all 11508

How to set approval status via CSOM

$
0
0

I am trying to set the Approved column for a doc library item via CSOM but can't seem to ge the update to reflect the changes. I tried checking in/out the item and getting an instance of the item itself but nothing changes. The item is still pending. The running account has both FULL and Approve permissions. Any idea why?

Dim tvItem As ClientOM.File = list.GetItemById(txtID.Text).File

ctx.Load(tvItem)
ctx.ExecuteQuery()

tvItem.ListItemAllFields("_ModerationStatus") = 0
tvItem.ListItemAllFields("_ModerationComments") = txtComments.Text

ctx.ExecuteQuery()
Thanks!

Viewing all articles
Browse latest Browse all 11508

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>