Tag Info

New answers tagged

0

For uploading file to a particular folder you need to initialize it as $folderName = "FolderToUpload"; $folder = $spSourceList.getfolder($spSourceWeb.Url + "/" + $libraryName + "/" + $folderName) For file check in you can use $spFile.CheckIn("Comments", 1) To Approve File you can use $spFile.Approve("Comments")


1

Using JavaScript you can get ID using var list; ExecuteOrDelayUntilScriptLoaded(Start, "sp.js"); function Start() { var currentcontext = new SP.ClientContext.get_current(); list = currentcontext.get_web().get_lists().getByTitle('ListTitle'); currentcontext.load(list, 'Id'); currentcontext.executeQueryAsync(Function.createDelegate(this, ...


1

I think that depends a lot on how your project is structured and your deployment process. In scenarios like this, I use feature activation code to provision my document library with a GUID generated by the Visual Studio tool. Then in my code I reference this GUID where necessary. Then once the feature is packaged, deployed, and activated, it is consistent ...


0

If you are using SharePoint designer, then you can upload your HTML file under Site pages section and just pass the URL.


0

try below code <asp:FileUpload id="FileUploadControl" runat="server" /> <asp:Button runat="server" id="UploadButton" text="Upload" onclick="UploadButton_Click" /> to upload use below code in the event string filename = Path.GetFileName(FileUploadControl.FileName); FileUploadControl.SaveAs(Server.MapPath("~/") + filename); ...


3

Right after you add the file: $item = $spFile.Item; $item["TextOrChoiceColumnInternalName"] = "New Value" $spUser = Get-SPUser -Identity "domain\username" -Web $spSourceWeb; $item["UserFieldInternalName"] = $spUser; $item.SystemUpdate($false); Use SystemUpdate($false) if you don't want to increase the version of the item.. To check in a file use: ...



Top 50 recent answers are included