How to Approve/Reject using SharePoint client Object Model
-
2011年3月3日 上午 07:55
Hi,
I am trying to get file from document library by using SharePoint client object model, i want to do following operations
--Check out
--Update with new file
--Check IN
--Publish
--Approve
i didnot see Approve method in microsoft.Sharepoint.client.File(http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.client.file_methods.aspx)
is there any workaround to do Approve a file ?
thanks
Appaji
S.Venkata Appaji
所有回覆
-
2011年3月3日 上午 08:26
Try this:
item.set_item('_ModerationStatus', 0); item.update();context.load(item); context.executeQueryAsync(successFunction, failureFunction);- 已標示為解答 Xue-Mei Chang-MSFTModerator 2011年3月11日 上午 09:03
-
2011年3月3日 上午 09:29
Thanks for your reply, i am not able to see set_item for client.file.
here is my code
Microsoft.SharePoint.Client.
File testFile = oWebsite.GetFileByServerRelativeUrl(filePath);
clientContext.Load(testFile);
clientContext.ExecuteQuery();
testFile.CheckOut();
set_item is not member of file (http://msdn.microsoft.com/en-us/library/ee542743.aspx)
can you share if you have sample code for check out,check in,publish and approve with SharePoint client object model.
S.Venkata Appaji

