Hot answers tagged


I figured it out. You can use SPFile to check if the file exist in the library and then move it if it does. SPFile file = site.GetFile("/Final Candidates/" + CName); if (file.Exists) { file.MoveTo("Draft Candidates/" + CName, true); } Reference:


Try to get a new instance of the SPFile object right before you try the .CheckOut() instruction. I may be wrong, but I think you are experiencing a pretty common transaction related issue. if (file != null) { web.AllowUnsafeUpdates = true; Stream readStream = file.OpenBinaryStream(); //file is SPFile type SPFile ...


Try This, Declare a Client context ctx and get your list/library name: RoleDefinition roleDef = ctx.Web.RoleDefinitions.GetByType(RoleType.Reader); RoleDefinitionBindingCollection roleDefBinding = new RoleDefinitionBindingCollection( ctx ); ctx.ExecuteQuery(); roleDefBinding.Add( roleDef ); CamlQuery query; query = ...


AFAIK, nothing in the client-side API can allow this. However, there's an old technology called "Front-Page RPC" (the name itself shows you how old it is!) that may be still available on SP2013 (even if it's kind of deprecated/not really documented). It is still there since it's used by Office applications to communicate with SharePoint. FP RPC is a ...

Only top voted, non community-wiki answers of a minimum length are eligible